summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fixed shuffle-reverse cost on AVX-512.Elena Demikhovsky2017-01-022-1/+3
| | | | | | (This changed was approved in https://reviews.llvm.org/D28118, but Simon asked to submit it separately). llvm-svn: 290812
* Revert "DR1391: Check for implicit conversion sequences for non-dependent ↵Renato Golin2017-01-029-362/+124
| | | | | | | | | | | | | | function template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation." This reverts commit r290808, as it broken all ARM and AArch64 test-suite test: MultiSource/UnitTests/C++11/frame_layout Also, please, next time, try to write a commit message in according to our guidelines: http://llvm.org/docs/DeveloperPolicy.html#commit-messages llvm-svn: 290811
* AVX-512 Loop Vectorizer: Cost calculation for interleave load/store patterns.Elena Demikhovsky2017-01-0214-23/+1055
| | | | | | | | | | | | X86 target does not provide any target specific cost calculation for interleave patterns.It uses the common target-independent calculation, which gives very high numbers. As a result, the scalar version is chosen in many cases. The situation on AVX-512 is even worse, since we have 3-src shuffles that significantly reduce the cost. In this patch I calculate the cost on AVX-512. It will allow to compare interleave pattern with gather/scatter and choose a better solution (PR31426). * Shiffle-broadcast cost will be changed in Simon's upcoming patch. Differential Revision: https://reviews.llvm.org/D28118 llvm-svn: 290810
* Reapply "[CodeGen] Fix invalid DWARF info on Win64"Keno Fischer2017-01-0213-36/+76
| | | | | | | This reapplies rL289013 (reverted in rL289014) with the fixes identified in D21731. Should hopefully pass the buildbots this time. llvm-svn: 290809
* DR1391: Check for implicit conversion sequences for non-dependent functionRichard Smith2017-01-029-124/+362
| | | | | | | | | | | | template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation. This does not implement the partial ordering portion of DR1391, which so far appears to be misguided. llvm-svn: 290808
* Address post-commit review comments.Richard Smith2017-01-022-4/+1
| | | | llvm-svn: 290807
* chrono: address post commit comments from HowardSaleem Abdulrasool2017-01-011-13/+17
| | | | | | | | | | | | | | | | | Drawing some inspiration from code from Bill O'Neal as pointed out by Howard, rework the code to avoid an overflow in the duration. Adjust the style to match libc++ style as well. Create a local typedef for the FILETIME duration (100-ns units). Use this to define the difference between the NT and the UNIX epochs (which previously overflowed due to the representation limits due to the bouncing to ns). Return the FILETIME duration biased by the NT-to-UNIX epoch conversion. Use of the custom duration makes it easier to read and reason about the code. llvm-svn: 290806
* chrono: address post-commit comments from majnemerSaleem Abdulrasool2017-01-011-8/+8
| | | | | | | Correct style to match libc++ style as pointed out by David Majnemer on IRC. NFC. llvm-svn: 290805
* chrono: give Windows a steady_clockSaleem Abdulrasool2017-01-011-14/+29
| | | | | | | Provide a definition for a steady monotonic clock by wrapping QueryPerformanceCounter. llvm-svn: 290804
* chrono: implement a Windows version of system_clock::nowSaleem Abdulrasool2017-01-011-0/+32
| | | | | | | | | | | | | | system_clock::now is not entirely straight forward on Windows, which does not have a clock_gettime function. GetSystemTimeAsFileTime gives us the value relative to the NT epoch (Jan 1 1601) rather than the Unix epoch (Jan 1 1970). However, this function has a low resolution (~10ms). Newer versions of Windows provide GetSystemTimePreciseAsFileTime which gives us a much more accurate time (<1us). Unfortunately, the latter is only available on Windows 8+ when targeting desktop apps. llvm-svn: 290803
* build: further improve flags handling for clSaleem Abdulrasool2017-01-011-7/+13
| | | | | | | | | This allows us to build with cl (or rather clang-cl) by using the correct spelling for `-include` (`/FI` for cl). clang-cl and cl default to C++11/C++14 as they support it rather than permitting an explicit language standard. llvm-svn: 290802
* build: dont detect libraries for WindowsSaleem Abdulrasool2017-01-011-6/+27
| | | | | | | | | Hard code the defaults for Windows for the time being. The checks really are always going to return the same value. Technically, the pthread linkage is possible, however, it seems better to use the Win32 threading along with the external threading support that we have added. llvm-svn: 290801
* build: differentiate between building for and on WindowsSaleem Abdulrasool2017-01-011-1/+1
| | | | | | | | | This is necessary to support cross-compiling a Windows libc++ from Linux. The CMAKE_SYSTEM_HOST_NAME tells you what, in autotools parlance, is known as the build as opposed to WIN32 which maps to, in autotools parlance, host. llvm-svn: 290800
* CodeGen: update comment about RTTI fieldSaleem Abdulrasool2017-01-011-1/+1
| | | | | | | | | | The MS ABI RTTI has a reserved field which is used as a cache for the demangled name. It must be zero-initialized, which is used as a hint by the runtime to say that the cache has not been populated. Since this field is populated at runtime, the RTTI structures must be placed in the .data section rather than .rdata. NFC llvm-svn: 290799
* [InstCombine] add explanatory comment to test; NFCSanjay Patel2017-01-011-0/+3
| | | | | | The test was added at r290797, and a patch to enable the transform is proposed in D28204. llvm-svn: 290798
* [InstCombine] add test to show potential nonnull attribute propagation; NFCSanjay Patel2017-01-011-0/+14
| | | | | | | This will change with the current draft of: https://reviews.llvm.org/D28204 llvm-svn: 290797
* [selectiondag] Check PromotedFloats map during expansive checks.Florian Hahn2017-01-011-0/+4
| | | | | | | | | | | | | | | Summary: `PromotedFloats` needs to be checked in `DAGTypeLegalizer::PerformExpensiveChecks`. This patch fixes a few type legalization failures with expansive checks for ARM fp16 tests. Reviewers: baldrick, bogner, arsenm Subscribers: arsenm, aemerson, llvm-commits Differential Revision: https://reviews.llvm.org/D28187 llvm-svn: 290796
* Fix typo in test case. NFCKelvin Li2016-12-311-1/+1
| | | | llvm-svn: 290795
* Fix an issue with isGuaranteedToTransferExecutionToSuccessorSanjoy Das2016-12-312-6/+71
| | | | | | | | | | | | | | I'm not sure if this was intentional, but today isGuaranteedToTransferExecutionToSuccessor returns true for readonly and argmemonly calls that may throw. This commit changes the function to not implicitly infer nounwind this way. Even if we eventually specify readonly calls as not throwing, isGuaranteedToTransferExecutionToSuccessor is not the best place to infer that. We should instead teach FunctionAttrs or some other such pass to tag readonly functions / calls as nounwind instead. llvm-svn: 290794
* Avoid const_cast; NFCSanjoy Das2016-12-311-2/+3
| | | | llvm-svn: 290793
* [c++17] Implement P0522R0 as written. This allows a template template argumentRichard Smith2016-12-3110-14/+233
| | | | | | | | | | | | | | | | | | | to be specified for a template template parameter whenever the parameter is at least as specialized as the argument (when there's an obvious and correct mapping from uses of the parameter to uses of the argument). For example, a template with more parameters can be passed to a template template parameter with fewer, if those trailing parameters have default arguments. This is disabled by default, despite being a DR resolution, as it's fairly broken in its current state: there are no partial ordering rules to cope with template template parameters that have different parameter lists, meaning that code that attempts to decompose template-ids based on arity can hit unavoidable ambiguity issues. The diagnostics produced on a non-matching argument are also pretty bad right now, but I aim to improve them in a subsequent commit. llvm-svn: 290792
* system_error: use strerror_r only for threaded codeSaleem Abdulrasool2016-12-311-0/+2
| | | | | | | | When building libc++ without threading, strerror_r is not used. Define the code only when threading is enabled. This allows us to build system_error for Windows, which ATM doesn't build with threading. llvm-svn: 290791
* [ValueTracking] add tests for known-nonnull-at; NFCSanjay Patel2016-12-311-0/+57
| | | | llvm-svn: 290790
* clean up some qualifier castingSaleem Abdulrasool2016-12-312-2/+3
| | | | | | | This cleans up the `-Wqual-cast` warnings from gcc 6 when building libc++. NFC. llvm-svn: 290789
* clean up `-Wmisleading-indentation` warningSaleem Abdulrasool2016-12-311-2/+2
| | | | | | Clean up the misleading indentation warning from GCC 6. NFC llvm-svn: 290788
* [Inliner] remove unnecessary null checks from AddAlignmentAssumptions(); NFCISanjay Patel2016-12-311-5/+3
| | | | | | | We bail out on the 1st line if the assumption cache is not set, so there's no need to check it after that. llvm-svn: 290787
* [ValueTracking] make dominator tree requirement explicit for ↵Sanjay Patel2016-12-312-5/+10
| | | | | | | | | | | | | | | | | isKnownNonNullFromDominatingCondition(); NFCI I don't think this hole is currently exposed, but I crashed regression tests for jump-threading and loop-vectorize after I added calls to isKnownNonNullAt() in InstSimplify as part of trying to solve PR28430: https://llvm.org/bugs/show_bug.cgi?id=28430 That's because they call into value tracking with a context instruction, but no other parts of the query structure filled in. For more background, see the discussion in: https://reviews.llvm.org/D27855 llvm-svn: 290786
* remove some inherited attributes on exceptionsSaleem Abdulrasool2016-12-312-2/+1
| | | | | | | | | | | | | | These exception types are marked with `_LIBCPP_EXCEPTION_ABI` which expands to `__attribute__((__visibility__("default")))` or `__declspec(dllexport)`. When building for Windows, we would hit an error: cannot apply 'dllexport' to a 'dllexport' class Remove the duplicate annotations as they will be inherited from the class. llvm-svn: 290785
* [clang-tidy] Add delete null pointer check.Gabor Horvath2016-12-317-0/+205
| | | | | | | | | | This check detects and fixes redundant null checks before deletes. Patch by: Gergely Angeli! Differential Revision: https://reviews.llvm.org/D21298 llvm-svn: 290784
* Update to isl-0.18-43-g0b4256fTobias Grosser2016-12-3116-332/+718
| | | | | | Even more isl coalesce changes. llvm-svn: 290783
* NewGVN: Print out DefiningAccess for both loads and stores when debugging.Daniel Berlin2016-12-311-1/+3
| | | | llvm-svn: 290782
* [clang] Fix clean build of generate-order-fileAlexander Shaposhnikov2016-12-312-24/+28
| | | | | | | | | | | | | This diff fixes the clean build of the target generate-order-file. In llvm/tools/clang/CMakeLists.txt add_subdirectory(utils/perf-training) should go after the block where the value of the variable CLANG_ORDER_FILE is set - otherwise (tested with cmake's version 3.6.2) the arguments of perf-helper.py gen-order-file will be ill-formed (CLANG_ORDER_FILE will be empty). Differential revision: https://reviews.llvm.org/D28153 llvm-svn: 290781
* Remove redundant assertion.Richard Smith2016-12-311-3/+0
| | | | llvm-svn: 290780
* [SmallPtrSet] Introduce a find primitive and rewrite count/erase in terms of itPhilip Reames2016-12-312-32/+27
| | | | | | | | This was originally motivated by a compile time problem I've since figured out how to solve differently, but the cleanup seemed useful. We had the same logic - which essentially implemented find - in several places. By commoning them out, I can implement find and allow erase to be inlined at the call sites if profitable. Differential Revision: https://reviews.llvm.org/D28183 llvm-svn: 290779
* [AVR] Optimize 16-bit ANDs with '1'Dylan McKay2016-12-313-1/+57
| | | | | | | | | | | | Summary: Fixes PR 31345 Reviewers: dylanmckay Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D28186 llvm-svn: 290778
* Typo fix in AST matcher documentation: s/aribtrary/arbitrary/James Dennett2016-12-311-1/+1
| | | | llvm-svn: 290777
* [InstCombine][AVX-512] Teach InstCombine that llvm.x86.avx512.vcomi.sd and ↵Craig Topper2016-12-312-0/+40
| | | | | | | | llvm.x86.avx512.vcomi.ss don't use the upper elements of their input. This was already done for the SSE/SSE2 version of the intrinsics. llvm-svn: 290776
* random: include __config before buildingSaleem Abdulrasool2016-12-311-0/+2
| | | | | | | We need to include __config to ensure that we know what random implementation is being used. Fixes compilation for Windows. llvm-svn: 290775
* [InstCombine][AVX-512] When turning intrinsics with masking into native IR, ↵Craig Topper2016-12-301-9/+20
| | | | | | | | don't emit a select if the mask is known to be all ones. This saves InstCombine the burden of having to optimize the select later. llvm-svn: 290774
* Wdocumentation fixSimon Pilgrim2016-12-301-133/+133
| | | | llvm-svn: 290773
* [X86][AVX512DQ] Add truncated math tests for AVX512DQ.Simon Pilgrim2016-12-301-187/+636
| | | | llvm-svn: 290772
* [X86][SSE] Fix truncated math test names.Simon Pilgrim2016-12-301-180/+180
| | | | | | Inconsistent naming convention and wrong name for some input/output types. llvm-svn: 290771
* [X86][AVX512] Regenerate test - missing shuffle commentsSimon Pilgrim2016-12-301-4/+4
| | | | llvm-svn: 290770
* Add a comment for a todo in LoopUnroll post cleanupPhilip Reames2016-12-301-0/+5
| | | | llvm-svn: 290769
* [LVI] Remove count/erase idiom in favor of checking result value of erasePhilip Reames2016-12-301-6/+2
| | | | | | Minor compile time win. Avoids an additional O(N) scan in the case where we are removing an element and costs nothing when we aren't. llvm-svn: 290768
* [doc] Clarify steps for contributors without commit access.Florian Hahn2016-12-301-2/+6
| | | | | | | | | | | | Summary: Update the Phabricator docs to clarify how changes are merged for contributors without commit access. Reviewers: delcypher, aaron.ballman Subscribers: aaron.ballman, anmol, llvm-commits Differential Revision: https://reviews.llvm.org/D28184 llvm-svn: 290767
* [clang] Minor fix to libASTMatcherTutorialMads Ravn2016-12-301-2/+2
| | | | | | | | | | | | | | | | There was a small error in the code in the tutorial. The tutorial contains a few errors which results in code not being able to compile. One error was described here: https://llvm.org/bugs/show_bug.cgi?id=25583 . I found and fixed the error and one additional error. Reviewers: aaron.ballman, malcolm.parsons Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28180 llvm-svn: 290766
* DebugInfo: change the PDB UniqueId type to uint8_tSaleem Abdulrasool2016-12-302-2/+2
| | | | | | | Since we type-erase the Windows GUID structure, use unsigned bytes rather than char, which may be signed (-fsigned-char). NFC llvm-svn: 290765
* COFF: replace a magic number and assert moreSaleem Abdulrasool2016-12-301-1/+4
| | | | | | | | | Assert that the size of the MD5 result is the same size as the signature field being populated. Use the sizeof operator to determine the size of the field being written rather than hardcoding it to the magic number 16. NFC. llvm-svn: 290764
* [MemDep] Handle gep with zeros for invariant.groupPiotr Padlewski2016-12-304-21/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: gep 0, 0 is equivalent to bitcast. LLVM canonicalizes it to getelementptr because it make SROA can then handle it. Simple case like void g(A &a) { z(a); if (glob) a.foo(); } void testG() { A a; g(a); } was not devirtualized with -fstrict-vtable-pointers because luck of handling for gep 0 in Memory Dependence Analysis Reviewers: dberlin, nlewycky, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28126 llvm-svn: 290763
OpenPOWER on IntegriCloud