summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [NFC] [Fortran Support] move Fortran array detection testcasesSiddharth Bhat2017-05-102-0/+0
| | | | | | move these testcases to where they belong: ScopDetect llvm-svn: 302735
* Fix MinGW build to use Pthread when the header is available.Eric Fiselier2017-05-101-1/+8
| | | | | | | | | | | | | Some MinGW configurations use WinPThread instead of the native threading interfaces. When this happens libc++ doesn't build because it tries to use the wrong threading API. This patch attempts to correctly detect and enable pthreads; Selecting them when __MINGW32__ is defined and __has_include(<pthread.h>) is true. I'm not sure if this works correctly 100% of the time but it seemed like the most correct approach available. llvm-svn: 302734
* [InstCombine] remove fold that swaps xor/or with constants; NFCISanjay Patel2017-05-102-12/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | // (X ^ C1) | C2 --> (X | C2) ^ (C1&~C2) This canonicalization was added at: https://reviews.llvm.org/rL7264 By moving xors out/down, we can more easily combine constants. I'm adding tests that do not change with this patch, so we can verify that those kinds of transforms are still happening. This is no-functional-change-intended because there's a later fold: // (X^C)|Y -> (X|Y)^C iff Y&C == 0 ...and demanded-bits appears to guarantee that any fold that would have hit the fold we're removing here would be caught by that 2nd fold. Similar reasoning was used in: https://reviews.llvm.org/rL299384 The larger motivation for removing this code is that it could interfere with the fix for PR32706: https://bugs.llvm.org/show_bug.cgi?id=32706 Ie, we're not checking if the 'xor' is actually a 'not', so we could reverse a 'not' optimization and cause an infinite loop by altering an 'xor X, -1'. Differential Revision: https://reviews.llvm.org/D33050 llvm-svn: 302733
* Improve diagnosis of unknown template name.Richard Smith2017-05-1010-36/+85
| | | | | | | | | When an undeclared identifier in a context that requires a type is followed by '<', only look for type templates when typo-correcting, tweak the diagnostic text to say that a template name (not a type name) was undeclared, and parse the template arguments when recovering from the error. llvm-svn: 302732
* Don't interfere with the __builtin_foo namespace under MSVCEric Fiselier2017-05-102-178/+103
| | | | | | | | | This patch follows up on feedback received in the review for D32988. Specifically that libc++ should not mess with the __builtin namespace, and that libc++ should use __popcnt to implement __pop_count under MSVC. llvm-svn: 302731
* AMDGPU: Make some packed shuffles freeMatt Arsenault2017-05-105-42/+155
| | | | | | | VOP3P instructions can encode access to either half of the register. llvm-svn: 302730
* AMDGPU: Add new subtarget features for gfx9 flat instructionsMatt Arsenault2017-05-103-1/+38
| | | | | | | Flat instructions gain an immediate offset, and 2 new sets of segment specific flat instructions are added. llvm-svn: 302729
* Fix bad #endif in msvc_stdlib_force_include.hpp.Billy Robert O'Neal III2017-05-101-6/+7
| | | | llvm-svn: 302728
* [libc++] Refactor Windows support headers.Eric Fiselier2017-05-1014-114/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch refactors and tries to remove as much of the Windows support headers as possible. This is needed because they currently introduce super weird include cycles and dependencies between STL and libc headers. The changes in this patch are: * remove `support/win32/support.h` completely. The required parts have either been moved into `support/win32/msvc_support.h` (for `MSVC` only helpers not needed by Clang), or directly into their respective `foo.h` headers. * Combine `locale_win32.h` and `locale_mgmt_win32.h` into a single headers, this header should only be included within `__locale` or `locale` to avoid include cycles. * Remove the unneeded parts of `limits_win32.h` and re-name it to `limits_msvc_win32.h` since it's only needed by Clang. I've tested this patch using Clang on Windows, but I suspect it might technically regress our non-existent support for MSVC. Is somebody able to double check? This refactor is needed to support upcoming fixes to `<locale>` on Windows. Reviewers: bcraig, rmaprath, compnerd, EricWF Reviewed By: EricWF Subscribers: majnemer, cfe-commits Differential Revision: https://reviews.llvm.org/D32988 llvm-svn: 302727
* [Simplify] Mark variables as used. NFC.Michael Kruse2017-05-101-0/+1
| | | | | | Mark one more variable as used that is needed in assertions. llvm-svn: 302726
* [Simplify] Mark variables as used. NFC.Michael Kruse2017-05-101-0/+2
| | | | | | Mark variables as used that are needed in assertions. llvm-svn: 302725
* Implement LWG 2591 - Patch from K-BalloEric Fiselier2017-05-102-1/+5
| | | | llvm-svn: 302724
* XFAIL is_trivially_copyable test for compilers that don't implement Core 2094Eric Fiselier2017-05-101-1/+3
| | | | llvm-svn: 302723
* [Fix][Fortran Support] Don't use -debug-only in pattern matching test casesSiddharth Bhat2017-05-102-2/+2
| | | | | | | -debug-only is unnecessary and causes the tests to break in Release mode. Remove the option to opt in the test cases. llvm-svn: 302722
* Fix enable_shared_from_this test in C++11Eric Fiselier2017-05-101-7/+6
| | | | llvm-svn: 302721
* Fix errored return value in CheckFunctionReturnType and add a fixit hintErich Keane2017-05-103-2/+16
| | | | | | | | | | | As discovered by ChenWJ and listed on cfe-dev, the error for Objective C return type ended up being wrong. This fixes that. Additionally, as a "while we're there", the other usages of this error and the usage of the FP above both use a FixItHint, so I'll add it here. Differential Revision: https://reviews.llvm.org/D32759 llvm-svn: 302720
* Remove unused #include.Rui Ueyama2017-05-101-1/+0
| | | | llvm-svn: 302719
* Rename parallelFor -> parallelForEachN.Rui Ueyama2017-05-105-6/+6
| | | | | | So that it is clear that the function is a wrapper for for_each_n. llvm-svn: 302718
* [ConstantRange] Fix the early out in ConstantRange::multiply for positive ↵Craig Topper2017-05-102-2/+3
| | | | | | | | | | numbers to really do what the comment says r271020 added an early out to skip the signed multiply portion of ConstantRange::multiply. The comment says we don't need to do signed multiply if the range is only positive numbers, but the implemented check only ensures that the start of the range is positive. It doesn't look at the end of the range. This patch checks the end of the range instead. Because Upper is one more than the end we have to see if its positive or if its one past the last positive number. llvm-svn: 302717
* [APInt] Add negate helper method to implement twos complement. Use it to ↵Craig Topper2017-05-102-8/+10
| | | | | | shorten code. llvm-svn: 302716
* [DeLICM] Avoid compiler warning. NFC.Michael Kruse2017-05-101-1/+1
| | | | | | | gcc 5.4 warns about using a C-style case to case away a const. Use case a const_cast instead. llvm-svn: 302715
* [NewGVN] Introduce a definesNoMemory() helper and use it.Davide Italiano2017-05-101-3/+5
| | | | | | | This is nice as is, but it will be used in my next patch to fix a bug. Suggested by Daniel Berlin. llvm-svn: 302714
* Clean up LIT failure output by not showing the entire environmentEric Fiselier2017-05-101-28/+3
| | | | llvm-svn: 302713
* [SDAG] Relax conditions under stores of loaded values can be mergedNirav Dave2017-05-103-28/+36
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Allow consecutive stores whose values come from consecutive loads to merged in the presense of other uses of the loads. Previously this was disallowed as in general the merged load cannot be shared with the other uses. Merging N stores into 1 may cause as many as N redundant loads. However in the context of caching this should have neglible affect on memory pressure and reduce instruction count making it almost always a win. Fixes PR32086. Reviewers: spatel, jyknight, andreadb, hfinkel, efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30471 llvm-svn: 302712
* [DeLICM] Always normalize domain. NFC.Michael Kruse2017-05-102-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some isl functions can simplify their __isl_keep arguments. The argument object after the call uses different contraints to represent the same set. Different contraints can result in different outputs when printed to a string. In assert builds additional isl functions are called (in assert() or mentioned, these can change the internal representation of its read-only arguments such that printed strings are different in debug and non-debug builds. What happened here is that a call to isl_set_is_equal inside an assert in getScatterFor normalizes one of its arguments such that one redundant constraint is removed. The redundant constraint therefore does not appear in the string representing the domain, which FileCheck notices as a regression test failure compared to a build with assertions disabled. This fix removes the redundant contraints the domain from the start such that the redundant contraint is removed in assert and non-assert builds. Isl adds a flag to such sets such that the removal of redundancies is not done multiple times (here: by isl_set_is_equal). Thanks to Tobias Grosser for reporting and hinting to the cause. llvm-svn: 302711
* Update is_trivially_copyable tests with CWG 2094Billy Robert O'Neal III2017-05-101-4/+4
| | | | | | | | | Clang 5.0 implements these changes here: https://github.com/llvm-mirror/clang/commit/87cd035326a39523eeb1b295ad36cff337141ef9 MSVC++ will implement these changes in the first toolset update to 2017. Differential Revision: https://reviews.llvm.org/D33021 llvm-svn: 302710
* [libc++] Fix PR32979 - types with a private std::enable_shared_from_this ↵Eric Fiselier2017-05-102-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | base break shared_ptr Summary: This patch fixes bugs.llvm.org/PR32979. [util.smartptr.shared.const] says: > In the constructor definitions below, enables shared_from_this with p, for a pointer p of type Y*, means > that if Y has an unambiguous and accessible base class that is a specialization of enable_shared_from_- > this. This means that libc++ needs to respect the access specifier of the base class, and not attempt to construct and enabled_shared_from_this base if it is private. However access specifiers don't affect overload resolution so our current implementation will attempt to construct the private base. This patch uses SFINAE to correctly detect if the shared_ptr input has an accessible enable_shared_from_this base class. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33033 llvm-svn: 302709
* Use a DenseMap in LinkerScript::getCmd.Rafael Espindola2017-05-103-7/+17
| | | | | | This improves many-sections.s with a linker script from 22s to 0.9s. llvm-svn: 302708
* [test] support machinery changes for EDG & C1XX /ZaCasey Carter2017-05-106-9/+77
| | | | | | | | | | | | | | | | | | | | | This change works around a couple of bugs: 1. EDG doesn't like explicit constexpr in a derived class. This program: struct Base {}; struct Derived : Base { constexpr Derived() = default; }; triggers "error: defaulted default constructor cannot be constexpr." 2. C1XX with /Za has no idea which constructor needs to be valid for copy elision. The change also conditionally disables parts of the msvc_stdlib_force_include.hpp header that conflict with external configuration when _LIBCXX_IN_DEVCRT is defined. Differential Revision: https://reviews.llvm.org/D32778 llvm-svn: 302707
* Refactor OutputSection to OutputSectionCommand mapping.Rafael Espindola2017-05-102-31/+25
| | | | | | We now always use getCmd. I will optimize it in a followup commit. llvm-svn: 302706
* Ensure non-null ProfileSummaryInfo passed to ModuleSummaryIndex builderTeresa Johnson2017-05-103-2/+5
| | | | | | | | | | | | This fixes a ubsan bot failure after r302597, which made getProfileCount non-static, but ended up invoking it on a null ProfileSummaryInfo object in some cases from buildModuleSummaryIndex. Most testing passed because the non-static getProfileCount currently doesn't access any member variables, but I found this when testing a follow on patch (D32877) that adds a member variable access. llvm-svn: 302705
* [APInt] Make toString use udivrem instead of calling the divide helper ↵Craig Topper2017-05-101-8/+9
| | | | | | | | | | method directly. Do a better job of reusing allocations while looping. NFCI This lets toString take advantage of the degenerate case checks in udivrem and is just generally cleaner. One minor downside of this is that the divisor APInt now needs to be the same size as Tmp which requires an additional allocation. But we were doing a poor job of reusing allocations before so the new code should still be an improvement. llvm-svn: 302704
* [APInt] Use uint32_t instead of unsigned for the storage type throughout the ↵Craig Topper2017-05-101-39/+34
| | | | | | divide code. Use Lo_32/Hi_32/Make_64 helpers instead of casts and shifts. NFCI llvm-svn: 302703
* [APInt] Use getRawData to slightly simplify some code.Craig Topper2017-05-101-2/+2
| | | | llvm-svn: 302702
* [APInt] Remove check for single word since single word was handled earlier ↵Craig Topper2017-05-101-2/+2
| | | | | | in the function. NFC llvm-svn: 302701
* [ConstantRange] Add test case showing a case where we pick too large of a ↵Craig Topper2017-05-101-0/+5
| | | | | | range for multiply after r271020. llvm-svn: 302700
* Small refactoring in DAGCombine. NFCAmaury Sechet2017-05-101-3/+3
| | | | llvm-svn: 302699
* Fix use of now removed %exec test substitutionEric Fiselier2017-05-102-2/+2
| | | | llvm-svn: 302698
* Rename variables to conform to LLVM naming conventions.Zachary Turner2017-05-102-19/+19
| | | | llvm-svn: 302697
* [Fix] [Fortran Support] Fix variable name & make testcase activate on releaseSiddharth Bhat2017-05-101-2/+2
| | | | | | | | | | | | There was: #ifdef NDEBUG This should be: #ifndef NDEBUG Also, the variable name was incorrect. Fixed the variable name. llvm-svn: 302696
* [Sema] Objective-C++ support for type trait __is_base_ofErik Pilkington2017-05-102-3/+42
| | | | | | | | rdar://24308607 Differential revision: https://reviews.llvm.org/D32891 llvm-svn: 302695
* [ELF] Improve error message for incompatible section typesRui Ueyama2017-05-102-4/+9
| | | | | | | | | | | | | | | | | Previously we were not printing out the type of the incompatible section which made it difficult to determine what the problem was. The error message format has been change to the following: error: section type mismatch for .shstrtab >>> <internal>:(.shstrtab): SHT_STRTAB >>> output section .shstrtab: Unknown Patch by Alexander Richardson. Differential Revision: https://reviews.llvm.org/D32488 llvm-svn: 302694
* Revert "Add dyld to sanitizer procmaps on darwin"Francis Ricci2017-05-102-80/+7
| | | | | | | | | This breaks several tests because we don't always have access to __cxa_guard functions This reverts commit 45eb470c3e9e8f6993a204e247c33d4092237efe. llvm-svn: 302693
* Revert "Disable static caching of dyld header on Go sanitizers"Francis Ricci2017-05-101-4/+0
| | | | | | | This is a problem on more than just the go sanitizers, so it's not a good enough fix for the issue. llvm-svn: 302692
* [XRay] Fix XRay PPC return value bug.Tim Shen2017-05-102-16/+77
| | | | | | | | | | | | | | | | | | Summary: This bug is caused by the incorrect handling of return-value registers. According to OpenPOWER 64-Bit ELF V2 ABI 2.2.5, up to 2 general-purpose registers are going to be used for return values, and up to 8 floating point registers or vector registers are going to be used for return values. Reviewers: dberris, echristo Subscribers: nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D33027 llvm-svn: 302691
* Fix -DLLVM_ENABLE_THREADS=OFF build of lld after r302613Hans Wennborg2017-05-101-4/+5
| | | | llvm-svn: 302690
* [AST] RecursiveASTVisitor should not crash on lambdas with type attributesAlex Lorenz2017-05-102-1/+9
| | | | | | rdar://31960860 llvm-svn: 302689
* [clang-tidy][CMake] Make clang-tidy usable as distribution componentPetr Hosek2017-05-101-1/+1
| | | | | | | | | Use add_clang_tool rather than add_clang_executable to support clang-tidy as a distribution component. Differential Revision: https://reviews.llvm.org/D32815 llvm-svn: 302688
* [ELF] Define __ehdr_start unconditionally even when using linker scriptPetr Hosek2017-05-102-6/+17
| | | | | | | | | | This behavior differs from the semantics implemented by GNU linkers which only define this symbol iff ELF headers are in the memory mapped segment. Differential Revision: https://reviews.llvm.org/D33019 llvm-svn: 302687
* [XRay] Fix the test func-id-utils.cc on PPC.Tim Shen2017-05-101-9/+15
| | | | | | | | | | | | | | | | | | | | Summary: The test fails on PPC, because the address of a function may vary depending on whether the "taker" shares the same ToC (roughly, in the same "module") as the function. Therefore the addresses of the functions taken in func-id-utils.cc may be different from the addresses taken in xray runtime. Change the test to be permissive on address comparison. Reviewers: dberris, echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33026 llvm-svn: 302686
OpenPOWER on IntegriCloud