summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] Add numerous options to libc++ LIT test suite configuration. Eric Fiselier2014-12-224-51/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to fully replace the testit script we need to update LIT so it provides the same functionality. This patch adds a number of different configuration options to LIT to do that. It also adds documentation for all of the command line parameters that LIT supports. Generic options added: - `libcxx_headers` - `libcxx_library` - `compile_flags` Generic options modified: - `link_flags`: Changed from overriding the default args to adding extra args instead (to match compile flags) - `use_sanitizer`: Renamed from `llvm_use_sanitizer` Please see the added documentation for more information about the switches. As for the actual documentation I'm not sure if it should be kept in libc++ forever since it adds an undue maintenance burden, but I think it should be added for the time being while the changes are new. I'm verify unskilled with HTML so if the documentation needs any changes please let me know. Hopefully this will kill testit. Reviewers: jroelofs, mclow.lists, danalbert Reviewed By: danalbert Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D5877 llvm-svn: 224728
* [x86] Add vector @llvm.ctpop intrinsic custom loweringBruno Cardoso Lopes2014-12-222-0/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when ctpop is supported for scalar types, the expansion of @llvm.ctpop.vXiY uses vector element extractions, insertions and individual calls to @llvm.ctpop.iY. When not, expansion with bit-math operations is used for the scalar calls. Local haswell measurements show that we can improve vector @llvm.ctpop.vXiY expansion in some cases by using a using a vector parallel bit twiddling approach, based on: v = v - ((v >> 1) & 0x55555555); v = (v & 0x33333333) + ((v >> 2) & 0x33333333); v = ((v + (v >> 4) & 0xF0F0F0F) v = v + (v >> 8) v = v + (v >> 16) v = v & 0x0000003F (from http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel) When scalar ctpop isn't supported, the approach above performs better for v2i64, v4i32, v4i64 and v8i32 (see numbers below). And even when scalar ctpop is supported, this approach performs ~2x better for v8i32. Here, x86_64 implies -march=corei7-avx without ctpop and x86_64h includes ctpop support with -march=core-avx2. == [x86_64h - new] v8i32: 0.661685 v4i32: 0.514678 v4i64: 0.652009 v2i64: 0.324289 == [x86_64h - old] v8i32: 1.29578 v4i32: 0.528807 v4i64: 0.65981 v2i64: 0.330707 == [x86_64 - new] v8i32: 1.003 v4i32: 0.656273 v4i64: 1.11711 v2i64: 0.754064 == [x86_64 - old] v8i32: 2.34886 v4i32: 1.72053 v4i64: 1.41086 v2i64: 1.0244 More work for other vector types will come next. llvm-svn: 224725
* [Msan] Fix msan_test.cc inclusions to build the unit tests on FreeBSDViktor Kutuzov2014-12-221-6/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D6757 llvm-svn: 224724
* Fix PR22000. __bit_iterator::move_backwards. Also make a note that ↵Marshall Clow2014-12-221-1/+1
| | | | | | | | __bit_iterator is quite underrepresented in the libc++ tests suite. llvm-svn: 224723
* Remove unused header. NFC.Juergen Ributzka2014-12-221-1/+0
| | | | llvm-svn: 224722
* Add a C++ marker to this header file.Adrian Prantl2014-12-221-1/+1
| | | | llvm-svn: 224721
* [C API] Expose LLVMGetGlobalValueAddress and LLVMGetFunctionAddress.Peter Zotov2014-12-223-0/+50
| | | | | | Patch by Ramkumar Ramachandra <artagnon@gmail.com> llvm-svn: 224720
* Disable trigraphs in microsoft mode by default. Matches cl.exe.Nico Weber2014-12-222-11/+13
| | | | | | | | | | The default value of Opts.Trigraphs now no longer depends solely on the language input kind, so move the code out of setLangDefaults(). Also make sure that Opts.MSVCCompat is set before the Trigraph code runs. Related to PR21974. llvm-svn: 224719
* Rename test.cc files to test.cpp.Nico Weber2014-12-226-3/+3
| | | | | | | The lit.cfg files only add .cpp to suffixes, so these tests used to never run, oops. (Also tweak to of these tests in minor ways to make the actually pass.) llvm-svn: 224718
* [CodeGenPrepare] Handle properly the promotion of operands when this does notQuentin Colombet2014-12-222-3/+32
| | | | | | | | | generate instructions. Fixes PR21978. Related to <rdar://problem/18310086> llvm-svn: 224717
* Add test coverage for cc1's trigraph option handling.Nico Weber2014-12-221-0/+15
| | | | llvm-svn: 224714
* Simplify test for rdar://19256338Fariborz Jahanian2014-12-221-12/+4
| | | | | | (from patch r224549). llvm-svn: 224713
* AddressSanitizer: Abort after failed exec() and get rid of the allow_reexec ↵Kuba Brecka2014-12-224-17/+8
| | | | | | | | | | | | | | | | ASan flag As mentioned in https://code.google.com/p/address-sanitizer/issues/detail?id=365, when the re-exec that adds the required DYLD_INSERT_LIBRARIES variable fails, ASan currently continues to run, but things are broken (some memory can be overwritten, interceptors don't work, ...). This patch aborts if the execv() fails and prints an error message that DYLD_INSERT_LIBRARIES is required. It also removes the "alllow_reexec" flag, since using it causes the same issues. Reviewed at http://reviews.llvm.org/D6752 llvm-svn: 224712
* AddressSanitizer: Properly handle dispatch_source_set_cancel_handler with aKuba Brecka2014-12-221-0/+4
| | | | | | | | | | | | | | | | | | | | | NULL handler Per https://developer.apple.com/library/mac/documentation/Performance/Reference/GCD_libdispatch_Ref/index.html, the dispatch_source_set_cancel_handler() API *can* be called with a NULL handler. In that case, the libdispatch removes an already existing cancellation handler, if there was one. ASan's interceptor always creates a new block that always tries to call the original handler. In case the original block is NULL, a segmentation fault happens. Let's fix that by not wrapping a NULL-block at all. It looks like all the other libdispatch APIs (which we intercept) do *not* allow NULL. So it's really only the dispatch_source_set_cancel_handler one that needs this fix. Reviewed at http://reviews.llvm.org/D6747 llvm-svn: 224711
* [ASan] Fix the logic that decides whether we need to spawn a new ↵Alexander Potapenko2014-12-221-3/+3
| | | | | | llvm-symbolizer in asan_symbolize.py llvm-svn: 224710
* [Sanitizers] Intercept wcsnrtombs() on FreeBSDViktor Kutuzov2014-12-221-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D6755 llvm-svn: 224709
* [Msan] Fix uname() interception on FreeBSDViktor Kutuzov2014-12-221-4/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D6738 llvm-svn: 224708
* AVX-512: Added all forms of BLENDM instructions,Elena Demikhovsky2014-12-227-57/+479
| | | | | | intrinsics, encoding tests for AVX-512F and skx instructions. llvm-svn: 224707
* Lower multiply-negate operation to mneg on AArch64Karthik Bhat2014-12-222-0/+19
| | | | | | | | | | | This patch pattern matches code such as- neg w8, w8 mul w8, w9, w8 to mneg w8, w8, w9 Review: http://reviews.llvm.org/D6754 llvm-svn: 224706
* Convert a few tests to FileCheck. NFC.Rafael Espindola2014-12-224-14/+38
| | | | llvm-svn: 224705
* The leak detector is dead, long live asan and valgrind.Rafael Espindola2014-12-2213-273/+0
| | | | | | | In resent times asan and valgrind have found way more memory management bugs in llvm than the special purpose leak detector. llvm-svn: 224703
* tsan: reset stack0 in the first partition of thread traceDmitry Vyukov2014-12-222-1/+53
| | | | | | | stack0/mset0 contained bogus values from the previous thread that used the same id llvm-svn: 224702
* tsan: fix debugging outputDmitry Vyukov2014-12-221-2/+2
| | | | llvm-svn: 224701
* [Sanitizers] Intercept snprintf_l() on FreeBSDViktor Kutuzov2014-12-224-0/+56
| | | | | | Differential Revision: http://reviews.llvm.org/D6418 llvm-svn: 224700
* [Sanitizers] Intercept wordexp on FreeBSDViktor Kutuzov2014-12-221-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D6737 llvm-svn: 224699
* Add support for frameless function compact unwind encodings on x86_64/i386.Jason Molenda2014-12-221-46/+214
| | | | | | | | | | | | This completes the compact unwind support for x86 targets. I'm still skipping the UNWIND_X86_64_MODE_STACK_IND encodings for x86_64 right now because clang was emitting bad data for this form until it was fixed in r217020 circa Sep 2014. arm64 parsing still needs to be added. llvm-svn: 224698
* tsan: add acquire/release functions to java interfaceDmitry Vyukov2014-12-224-0/+83
| | | | | | they are required to handle synchronization on volatile/final fields llvm-svn: 224697
* MS ABI: Make the string mangling code more conciseDavid Majnemer2014-12-221-36/+10
| | | | | | No functional change intended. llvm-svn: 224696
* Wrap to 80 columns. NfC.Nico Weber2014-12-221-10/+11
| | | | llvm-svn: 224695
* log-path_test testcase - make the invalid path more invalidKuba Brecka2014-12-221-2/+2
| | | | | | | | The ASan test/asan/TestCases/log-path_test.cc testcase uses /INVALID as an invalid path and expects that the program will not be allowed to create or write to that file. This actually is a valid writable path on one of my setups. Let's make the path more invalid. Reviewed at http://reviews.llvm.org/D6727 llvm-svn: 224694
* CodeGen: minor style tweaks to SSPSaleem Abdulrasool2014-12-211-13/+15
| | | | | | Clean up some style related things in the StackProtector CodeGen. NFC. llvm-svn: 224693
* [X86] Add hasSideEffects = 0 to CALLpcrel16. This matches what is inferred ↵Craig Topper2014-12-211-4/+5
| | | | | | from patterns for the 32-bit version. llvm-svn: 224692
* Enable (sext x) == C --> x == (trunc C) combineMatt Arsenault2014-12-215-37/+570
| | | | | | | | | Extend the existing code which handles this for zext. This makes this more useful for targets with ZeroOrNegativeOne BooleanContent and obsoletes a custom combine SI uses for i1 setcc (sext(i1), 0, setne) since the constant will now be shrunk to i1. llvm-svn: 224691
* Silence warnings in libunwind.Logan Chien2014-12-212-6/+9
| | | | | | | | | | | | | | * Remove the embedded directive undefined behavior by moving the the #ifdef out of the macro arguments. [-Wembedded-directive] * Remove the local variable shadowing warning by renaming frameInfo in UnwindLevel1-gcc-ext.c. [-Wshadow] * Explicitly cast the function pointer to void pointer to avoid the comparison between function pointer and void pointer. [-Wpedantic] llvm-svn: 224690
* Various unwinder work. Jason Molenda2014-12-215-121/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the changes are to the FuncUnwinders class -- as we've added more types of unwind information, the way this class was written was making it a mess to maintain. Instead of trying to keep one "non-call site" unwind plan and one "call site" unwind plan, track all the different types of unwind plans we can possibly retrieve for each function and have the call-site/non-call-site accessor methods retrieve those. Add a real "fast unwind plan" for x86_64 / i386 -- when doing an unwind through a function, this only has to read the first 4 bytes to tell if the function has a standard prologue sequence. If so, we can use the architecture default unwind plan to backtrace through this function. If we try to retrieve the save location for other registers later on, a real unwind plan will be used. This one is just for doing fast backtraces. Change the compact unwind plan importer to fill in the valid address range it is valid for. Compact unwind, in theory, may have multiple entries for a single function. The FuncUnwinders rewrite includes the start of supporting this correctly. In practice compact unwind encodings are used for the entire range of the function today -- in fact, sometimes the same encoding is used for multiple functions that have the same unwind rules. But I want to handle a single function that has multiple different compact unwind UnwindPlans eventually. llvm-svn: 224689
* Reapply "Change -save-temps to emit unoptimized bitcode files."Bob Wilson2014-12-2117-63/+166
| | | | | | | | | | | | | | | | | | | | | | | | This reapplies r224503 along with a fix for compiling Fortran by having the clang driver invoke gcc (see r224546, where it was reverted). I have added a testcase for that as well. Original commit message: It is often convenient to use -save-temps to collect the intermediate results of a compilation, e.g., when triaging a bug report. Besides the temporary files for preprocessed source and assembly code, this adds the unoptimized bitcode files as well. This adds a new BackendJobAction, which is mostly mechanical, to run after the CompileJobAction. When not using -save-temps, the BackendJobAction is combined into one job with the CompileJobAction, similar to the way the integrated assembler is handled. I've implemented this entirely as a driver change, so under the hood, it is just using -disable-llvm-optzns to get the unoptimized bitcode. Based in part on a patch by Steven Wu. rdar://problem/18909437 llvm-svn: 224688
* [X86] Swap operand order in Intel syntax on a bunch of aliases.Craig Topper2014-12-201-18/+18
| | | | llvm-svn: 224687
* [X86] Swap operand order of imul aliases in Intel syntax. Also disable ↵Craig Topper2014-12-201-6/+6
| | | | | | printing of the alias instead of the real instruction. llvm-svn: 224686
* [X86] Remove '*' from asm strings in far call/jump aliases for Intel syntax.Craig Topper2014-12-201-11/+11
| | | | llvm-svn: 224685
* [X86] Don't swap the order of segment and offset in immediate form of far ↵Craig Topper2014-12-201-4/+4
| | | | | | call/jump in Intel syntax. llvm-svn: 224684
* CodeGen: constify and use range loop for SSPSaleem Abdulrasool2014-12-201-8/+4
| | | | | | Use range-based for loop and constify the iterators. NFC. llvm-svn: 224683
* ARM: further improve deprecated diagnosis (LDM)Saleem Abdulrasool2014-12-203-6/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ARM ARM states: LDM/LDMIA/LDMFD: The SP can be in the list. However, ARM deprecates using these instructions with SP in the list. ARM deprecates using these instructions with both the LR and the PC in the list. LDMDA/LDMFA/LDMDB/LDMEA/LDMIB/LDMED: The SP can be in the list. However, instructions that include the SP in the list are deprecated. Instructions that include both the LR and the PC in the list are deprecated. POP: The SP can only be in the list before ARMv7. ARM deprecates any use of ARM instructions that include the SP, and the value of the SP after such an instruction is UNKNOWN. ARM deprecates the use of this instruction with both the LR and the PC in the list. Attempt to diagnose use of deprecated forms of these instructions. This mirrors the previous changes to diagnose use of the deprecated forms of STM in ARM mode. llvm-svn: 224682
* [macho] Minor install_name fixesJean-Daniel Dupas2014-12-203-14/+29
| | | | | | | | | | | | | | | | | | | Summary: Fix the binary file reader to properly read dyld version info. Update the install_name test case to properly test the binary reader. We can't use '-print_atoms' as the output format is 'native' yaml and it does not contains the dyld current and compatibility versions. Also change the timestamp value of LD_ID_DYLD to match the one generated by ld64. The dynamic linker (dyld) used to expects different values for timestamp in LD_ID_DYLD and LD_LOAD_DYLD for prebound images. While prebinding is deprecated, we should probably keep it safe and match ld64. Reviewers: kledzik Subscribers: llvm-commits Projects: #lld Differential Revision: http://reviews.llvm.org/D6736 llvm-svn: 224681
* Frontend: Fix typo in comments.Logan Chien2014-12-201-2/+2
| | | | llvm-svn: 224680
* strnlen isn't available on some platforms, use StringRef insteadDavid Majnemer2014-12-201-1/+2
| | | | llvm-svn: 224679
* [X86] Immediate forms of far call/jump are not valid in x86-64.Craig Topper2014-12-201-16/+20
| | | | llvm-svn: 224678
* This should have been part of r224676.David Majnemer2014-12-201-2/+2
| | | | llvm-svn: 224677
* InstCombine: Squash an icmp+select into bitwise arithmeticDavid Majnemer2014-12-202-6/+57
| | | | | | | | | (X & INT_MIN) == 0 ? X ^ INT_MIN : X into X | INT_MIN (X & INT_MIN) != 0 ? X ^ INT_MIN : X into X & INT_MAX This fixes PR21993. llvm-svn: 224676
* InstSimplify: Don't bother if getScalarSizeInBits returns zeroDavid Majnemer2014-12-201-4/+5
| | | | | | | getScalarSizeInBits returns zero when the comparison operands are not integral. No functionality change intended. llvm-svn: 224675
* Move unconditional test compile and link flags into their configuration ↵Eric Fiselier2014-12-201-2/+4
| | | | | | functions. llvm-svn: 224674
OpenPOWER on IntegriCloud