summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ThinLTO] Add missing FileCheck invocationTeresa Johnson2016-12-281-1/+1
| | | | | | One of the intended checks was not being performed. llvm-svn: 290671
* [NewGVN] Global sweep replacing NULL with nullptr. NFCI.Davide Italiano2016-12-281-10/+10
| | | | llvm-svn: 290670
* [NewGVN] Remove redundant code. NFCI.Davide Italiano2016-12-281-2/+0
| | | | llvm-svn: 290669
* [clang-tidy] google-explicit-constructor: ignore compiler-generated ↵Alexander Kornienko2016-12-282-2/+9
| | | | | | conversion operators. llvm-svn: 290668
* [NewGVN] equals() for loads/stores is the same. Unify.Davide Italiano2016-12-281-23/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D28116 llvm-svn: 290667
* Fix typo in commentEric Fiselier2016-12-281-1/+1
| | | | llvm-svn: 290666
* [PM] Introduce a devirtualization iteration layer for the new PM.Chandler Carruth2016-12-285-73/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an orthogonal and separated layer instead of being embedded inside the pass manager. While it adds a small amount of complexity, it is fairly minimal and the composability and control seems worth the cost. The logic for this ends up being nicely isolated and targeted. It should be easy to experiment with different iteration strategies wrapped around the CGSCC bottom-up walk using this kind of facility. The mechanism used to track devirtualization is the simplest one I came up with. I think it handles most of the cases the existing iteration machinery handles, but I haven't done a *very* in depth analysis. It does however match the basic intended semantics, and we can tweak or tune its exact behavior incrementally as necessary. One thing that we may want to revisit is freshly building the value handle set on each iteration. While I don't think this will be a significant cost (it is strictly fewer value handles but more churn of value handes than the old call graph), it is conceivable that we'll want a somewhat more clever tracking mechanism. My hope is to layer that on as a follow up patch with data supporting any implementation complexity it adds. This code also provides for a basic count heuristic: if the number of indirect calls decreases and the number of direct calls increases for a given function in the SCC, we assume devirtualization is responsible. This matches the heuristics currently used in the legacy pass manager. Differential Revision: https://reviews.llvm.org/D23114 llvm-svn: 290665
* [PM] Teach the CGSCC's CG update utility to more carefully invalidateChandler Carruth2016-12-285-65/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | analyses when we're about to break apart an SCC. We can't wait until after breaking apart the SCC to invalidate things: 1) Which SCC do we then invalidate? All of them? 2) Even if we invalidate all of them, a newly created SCC may not have a proxy that will convey the invalidation to functions! Previously we only invalidated one of the SCCs and too late. This led to stale analyses remaining in the cache. And because the caching strategy actually works, they would get used and chaos would ensue. Doing invalidation early is somewhat pessimizing though if we *know* that the SCC structure won't change. So it turns out that the design to make the mutation API force the caller to know the *kind* of mutation in advance was indeed 100% correct and we didn't do enough of it. So this change also splits two cases of switching a call edge to a ref edge into two separate APIs so that callers can clearly test for this and take the easy path without invalidating when appropriate. This is particularly important in this case as we expect most inlines to be between functions in separate SCCs and so the common case is that we don't have to so aggressively invalidate analyses. The LCG API change in turn needed some basic cleanups and better testing in its unittest. No interesting functionality changed there other than more coverage of the returned sequence of SCCs. While this seems like an obvious improvement over the current state, I'd like to revisit the core concept of invalidating within the CG-update layer at all. I'm wondering if we would be better served forcing the callers to handle the invalidation beforehand in the cases that they can handle it. An interesting example is when we want to teach the inliner to *update and preserve* analyses. But we can cross that bridge when we get there. With this patch, the new pass manager an build all of the LLVM test suite at -O3 and everything passes. =D I haven't bootstrapped yet and I'm sure there are still plenty of bugs, but this gives a nice baseline so I'm going to increasingly focus on fleshing out the missing functionality, especially the bits that are just turned off right now in order to let us establish this baseline. llvm-svn: 290664
* This is a large patch for X86 AVX-512 of an optimization for reducing code ↵Gadi Haber2016-12-2871-2329/+8200
| | | | | | | | | | | | size by encoding EVEX AVX-512 instructions using the shorter VEX encoding when possible. There are cases of AVX-512 instructions that have two possible encodings. This is the case with instructions that use vector registers with low indexes of 0 - 15 and do not use the zmm registers or the mask k registers. The EVEX encoding prefix requires 4 bytes whereas the VEX prefix can take only up to 3 bytes. Consequently, using the VEX encoding for these instructions results in a code size reduction of ~2 bytes even though it is compiled with the AVX-512 features enabled. Reviewers: Craig Topper, Zvi Rackoover, Elena Demikhovsky Differential Revision: https://reviews.llvm.org/D27901 llvm-svn: 290663
* Fix ABI incompatible C++03 nullptr_tEric Fiselier2016-12-281-1/+9
| | | | | | | | | | | | | In C++03 libc++ emulates nullptr_t using a class, and #define's nullptr. However this makes nullptr_t mangle differently between C++03 and C++11. This breaks any function ABI which takes nullptr_t. Thanfully Clang provides __nullptr in all dialects. This patch adds an ABI option to switch to using __nullptr in C++03. In a perfect world I would like to turn this on by default, since it's just ABI breaking fix to an ABI breaking bug. llvm-svn: 290662
* [CodeGen] Unique constant CompoundLiterals.George Burgess IV2016-12-283-4/+48
| | | | | | | | | | | | | | | | | | | | Our newly aggressive constant folding logic makes it possible for CGExprConstant to see the same CompoundLiteralExpr more than once. So, emitting a new GlobalVariable every time we see a CompoundLiteral is no longer correct. We had a similar issue with BlockExprs that was caught while testing said aggressive folding, so I applied the same style of fix (see D26410) here. If we find yet another case where this needs to happen, we should probably refactor this so we don't have a third DenseMap+getter+setter. As a design note: getAddrOfConstantCompoundLiteralIfEmitted is really only intended to be called by ConstExprEmitter::EmitLValue. So, returning a GlobalVariable* instead of a ConstantAddress costs us effectively nothing, and saves us either a few bytes per entry in our map or a bit of code duplication. llvm-svn: 290661
* Mark 'auto' as dependent when instantiating the type of a non-type templateRichard Smith2016-12-285-29/+61
| | | | | | | parameter. Fixes failed deduction for 'auto' non-type template parameters nested within templates. llvm-svn: 290660
* Remove dead debug_mode doc linkEric Fiselier2016-12-281-1/+0
| | | | llvm-svn: 290659
* Ensure <__debug> gets the nullptr definition in C++03Eric Fiselier2016-12-281-0/+4
| | | | llvm-svn: 290658
* Fix debug mode for vector/list and cleanup testsEric Fiselier2016-12-2828-900/+410
| | | | llvm-svn: 290657
* Fix stupid build error caused by a stupid personEric Fiselier2016-12-281-0/+3
| | | | llvm-svn: 290656
* Add tests for unordered container tests and std::stringEric Fiselier2016-12-287-15/+570
| | | | llvm-svn: 290655
* Fix __wrap_iter in debug mode and apply _NOEXCEPT_DEBUG to itEric Fiselier2016-12-282-46/+86
| | | | llvm-svn: 290654
* Fix build errors in C++03 caused by recent debug changesEric Fiselier2016-12-282-3/+6
| | | | llvm-svn: 290653
* Fix debug mode build w/o exceptionsEric Fiselier2016-12-283-1/+8
| | | | llvm-svn: 290652
* Implement a throwing version of _LIBCPP_ASSERT.Eric Fiselier2016-12-2814-186/+389
| | | | | | | | | | | | | | | | | | | | | | | | | This patch implements changes to allow _LIBCPP_ASSERT to throw on failure instead of aborting. The main changes needed to do this are: 1. Change _LIBCPP_ASSERT to call a handler via a replacable function pointer instead of calling abort directly. Additionally this patch implements two handler functions, one which aborts and another that throws an exception. 2. Add _NOEXCEPT_DEBUG macro for disabling noexcept spec on function which contain _LIBCPP_ASSERT. This is required in order to prevent assertion failures throwing through a noexcept function. This macro has no effect unless _LIBCPP_DEBUG_USE_EXCEPTIONS is defined. Having a non-aborting _LIBCPP_ASSERT is very important to allow sane testing of debug mode. Currently we can only have one test case per file, since the test case will cause the program to abort. Testing debug mode this way would require thousands of test files, most of which would be 95% boiler plate. I don't think this is a feasible strategy. Fortunately using a throwing debug handler solves these issues. Additionally this patch rewrites the documentation for debug mode. llvm-svn: 290651
* add cxa_demangle_fuzzerKostya Serebryany2016-12-283-0/+27
| | | | | | | | | | | | | | | | | Summary: All easy-to-find bugs in cxa_demangle where fixed now (https://bugs.chromium.org/p/chromium/issues/detail?id=606626) except for one (https://llvm.org/bugs/show_bug.cgi?id=31031). Now I'd like to properly integrate this fuzzer with the source tree and then run the fuzzer continuously on https://github.com/google/oss-fuzz Reviewers: compnerd, mclow.lists, mehdi_amini Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28133 llvm-svn: 290650
* [PM] Teach the inliner's call graph update to handle inserting new edgesChandler Carruth2016-12-282-7/+48
| | | | | | | | | | | | | | | | | when they are call edges at the leaf but may (transitively) be reached via ref edges. It turns out there is a simple rule: insert everything as a ref edge which is a safe conservative default. Then we let the existing update logic handle promoting some of those to call edges. Note that it would be fairly cheap to make these call edges right away if that is desirable by testing whether there is some existing call path from the source to the target. It just seemed like slightly more complexity in this code path that isn't strictly necessary. If anyone feels strongly about handling this differently I'm happy to change it. llvm-svn: 290649
* [InstCombine] Remove a piece of a comment that said that InstCombiner ↵Craig Topper2016-12-281-2/+1
| | | | | | contains pass infrastructure. That hasn't been true since r226618. NFC llvm-svn: 290648
* DR1315: a non-type template argument in a partial specialization is permittedRichard Smith2016-12-2814-137/+246
| | | | | | | | | | to make reference to template parameters. This is only a partial implementation; we retain the restriction that the argument must not be type-dependent, since it's unclear how that would work given the existence of other language rules requiring an exact type match in this context, even for type-dependent cases (a question has been raised on the core reflector). llvm-svn: 290647
* [PM] Actually commit the test update that was supposed to accompanyChandler Carruth2016-12-281-1/+0
| | | | | | r290644. Sorry for this. llvm-svn: 290646
* [LCG] Teach the ref edge removal to handle a ref edge that is trivialChandler Carruth2016-12-282-1/+85
| | | | | | | | | | | due to a call cycle. This actually crashed the ref removal before. I've added a unittest that covers this kind of interesting graph structure and mutation. llvm-svn: 290645
* [PM] Disable the loop vectorizer from the new PM's pipeline as itChandler Carruth2016-12-281-0/+4
| | | | | | | | | | | currenty relies on the old PM's dependency system forming LCSSA. The new PM will require a different design for this, and for now this is causing most of the issues I'm currently seeing in testing. I'd like to get to a testable baseline and then work on re-enabling things one at a time. llvm-svn: 290644
* Fix unit test broken by D27873.Evgeniy Stepanov2016-12-281-1/+1
| | | | | | | | | | | | | | | | Summary: Reduce RSS size treshold in the unit test to accomodate for the smaller ASAN quarantine size on Android (see D27873). Reviewers: eugenis Patch by Alex Shlyapnikov. Subscribers: danalbert, kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D28132 llvm-svn: 290643
* Update test that relies on the optimizer to match new output.Michael Kuperstein2016-12-281-13/+3
| | | | llvm-svn: 290642
* [InstCombine] Canonicalize insert splat sequences into an insert + shuffleMichael Kuperstein2016-12-286-11/+177
| | | | | | | | | | | This adds a combine that canonicalizes a chain of inserts which broadcasts a value into a single insert + a splat shufflevector. This fixes PR31286. Differential Revision: https://reviews.llvm.org/D27992 llvm-svn: 290641
* [libFuzzer] add an experimental flag -experimental_len_control=1 that sets ↵Kostya Serebryany2016-12-275-2/+32
| | | | | | max_len to 1M and tries to increases the actual max sizes of mutations very gradually (second attempt) llvm-svn: 290637
* Mark comparator call operator as constEric Fiselier2016-12-271-1/+1
| | | | llvm-svn: 290636
* [asan] Mark printf-m test as unsupported on windows.Evgeniy Stepanov2016-12-271-1/+1
| | | | llvm-svn: 290635
* [libFuzzer] don't create large random mutations when given an empty seedKostya Serebryany2016-12-271-1/+1
| | | | llvm-svn: 290634
* [clang-tidy] Make 2 checks register matchers for C++ only.Malcolm Parsons2016-12-272-0/+6
| | | | llvm-svn: 290633
* [asan] Fix handling of %m in printf interceptor.Evgeniy Stepanov2016-12-273-4/+21
| | | | llvm-svn: 290632
* DebugInfo: Don't include size/alignment on class declarationsDavid Blaikie2016-12-272-6/+1
| | | | | | | | | | This seems like it must've been a leftover by accident - no tests were backing it up & it doesn't make much sense to include size/alignment on class declarations (it'd only be on those declarations for which the definition was available - otherwise the size/alignment would not be known). llvm-svn: 290631
* [clang-tidy] Replace dead link in modernize-pass-by-value docMalcolm Parsons2016-12-271-1/+1
| | | | llvm-svn: 290630
* [compiler-rt] Fix compilation error after r290626Vitaly Buka2016-12-271-1/+3
| | | | llvm-svn: 290629
* [sanitizer-coverage] sort the switch casesKostya Serebryany2016-12-272-2/+7
| | | | llvm-svn: 290628
* Implement P0435R1 - Resolving LWG issues for common_typeEric Fiselier2016-12-273-14/+197
| | | | llvm-svn: 290627
* [compiler-rt] Move logic which replace memcpy interceptor with memmove from ↵Vitaly Buka2016-12-276-55/+42
| | | | | | | | | | | | asan to sanitizer_common. Reviewers: eugenis Subscribers: kubabrecka, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D28074 llvm-svn: 290626
* Add warning flag for "partial specialization is not more specialized than ↵Richard Smith2016-12-273-7/+8
| | | | | | primary template" error (since Eigen hits it), and while I'm here also add a warning flag for "partial specialization is not usable because one or more of its parameters cannot be deduced" warning. llvm-svn: 290625
* Fix PR31481 - 3+ parameter common_type isn't SFINAE friendlyEric Fiselier2016-12-272-8/+28
| | | | llvm-svn: 290624
* llvm-readobj: ELF: Make DT tags machine awareHemant Kulkarni2016-12-272-13/+29
| | | | llvm-svn: 290623
* [libFuzzer] fix UB and simplify the computation of the RNG seed ↵Kostya Serebryany2016-12-271-2/+2
| | | | | | (https://llvm.org/bugs/show_bug.cgi?id=31456) llvm-svn: 290622
* [asan] Fix test broken by r290540Vitaly Buka2016-12-271-12/+14
| | | | | | | | | | Reviewers: ahatanak, eugenis, myatsina Subscribers: kubabrecka, zizhar, llvm-commits Differential Revision: https://reviews.llvm.org/D28128 llvm-svn: 290621
* [PM] Teach MemDep to invalidate its result object when its cachedChandler Carruth2016-12-273-0/+98
| | | | | | | | analysis handles become invalid. Add a test case for its invalidation logic. llvm-svn: 290620
* [DOXYGEN] Improved doxygen comments for xmmintrin.h intrinsics.Ekaterina Romanova2016-12-271-105/+171
| | | | | | | | Added \n commands to insert a line breaks where necessary, since one long line of documentation is nearly unreadable. Formatted comments to fit into 80 chars. In some cases added \a command in front of the parameter names to display them in italics. llvm-svn: 290619
OpenPOWER on IntegriCloud