summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [RegionIterator] clang-format some pieces. NFC.Tim Shen2016-08-171-44/+43
| | | | llvm-svn: 278992
* Fix reverse to work on const rbegin()/rend().Pete Cooper2016-08-172-4/+43
| | | | | | | | | | | | Duncan found that reverse worked on mutable rbegin(), but the has_rbegin trait didn't work with a const method. See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382890.html for more details. Turns out this was already solved in clang with has_getDecl. Copied that and made it work for rbegin. This includes the tests Duncan attached to that thread, including the traits test. llvm-svn: 278991
* [Darwin] Stop linking libclang_rt.eprintf.aChris Bieneman2016-08-171-8/+13
| | | | | | | | | | | | | | | | | Summary: The eprintf library was added before the general OS X builtins library existed as a place to store one builtin function. Since we have for several years had an actual mandated builtin library for OS X > 10.5, we should just merge eprintf into the main library. This change will resolve PR28855. As a follow up I'll also patch compiler-rt to not generate the eprintf library anymore. Reviewers: ddunbar, bob.wilson Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23531 llvm-svn: 278988
* [CMake] Adding toolchain targets to PGO and Apple CMake cachesChris Bieneman2016-08-173-0/+4
| | | | | | The Xcode toolchain targets are useful on OS X hosts because you can construct and install multiple toolchians that can be used seamlessly. llvm-svn: 278987
* [libFuzzer] given 0 and 255 more preference when inserting repeated bytesKostya Serebryany2016-08-171-1/+2
| | | | llvm-svn: 278986
* [macho2yaml] Don't write empty linkedit dataChris Bieneman2016-08-173-1/+9
| | | | | | | | Since I stopped writing empty export tries it causes LinkEdit to potentially be completely empty which results in invalid yaml being generated. To prevent this we skip linkedit data if it is empty. llvm-svn: 278985
* Add test missed from r278983.Richard Smith2016-08-171-0/+9
| | | | llvm-svn: 278984
* PR18417: Increase -ftemplate-depth to the value 1024 recommended by the C++Richard Smith2016-08-172-2/+2
| | | | | | | | standard's Annex B. We now attempt to increase the process's stack rlimit to 8MiB on startup, which appears to be enough to allow this to work reliably. (And if it turns out not to be, we can investigate increasing it further.) llvm-svn: 278983
* [libFuzzer] one more mutation: ChangeBinaryInteger; also fix the breakage ↵Kostya Serebryany2016-08-173-2/+77
| | | | | | from r278970 llvm-svn: 278982
* Tail Duplication: Accept explicit threshold for duplicating.Kyle Butt2016-08-172-5/+13
| | | | | | | | This will allow tail duplication and tail merging during layout to have a shared threshold to make sure that they don't overlap. No observable change intended. llvm-svn: 278981
* TailDuplicator: Use optForSize instead of hasFnAttribute.Kyle Butt2016-08-171-1/+1
| | | | | | | This will cause minsize functions to have the same threshold as optsize functions, but otherwise should have no effects. llvm-svn: 278980
* Revert "Add a test for clang-tidy using the clang-cl driver."Zachary Turner2016-08-171-17/+0
| | | | | | | | | | This reverts commit fd1908ce445eba4544d64cc68b3c03249e4bf614. This should be the correct CL to revert. The clang-side patch that enabled this functionality was reverted, so this test needs to be reverted until it gets fixed. llvm-svn: 278979
* Revert "Revert "[Include-fixer] Install executables and support scripts""Zachary Turner2016-08-172-3/+25
| | | | | | | | | This reverts commit 2aff596257e1c45fa54baae823ecbe61a785174e. I'm having a bad day apparently. I reverted the wrong CL. This puts it back. llvm-svn: 278978
* Revert "[Include-fixer] Install executables and support scripts"Zachary Turner2016-08-172-25/+3
| | | | | | | | | This reverts commit b725a314a9b7f746c37f70909ec3c4dcb6d9f6b5. The patch that made this test work needed to be reverted, so this test needs to be reverted as well. llvm-svn: 278977
* Revert "[Tooling] Parse compilation database command lines on Windows."Zachary Turner2016-08-171-18/+0
| | | | | | | | | | This reverts commit 27a874790fc79f6391ad3703d7c790f51ac6ae1f. After the introduction of windows command line parsing, some unit tests began failing that expect to test gnu style command line quirks. The fix is mechanical but time consuming, so revert this for now. llvm-svn: 278976
* [libFuzzer] when printing the reproducer input, also print the base input ↵Kostya Serebryany2016-08-173-4/+13
| | | | | | and the mutation sequence llvm-svn: 278975
* ADT: Remove UB in ilist (and use a circular linked list)Duncan P. N. Exon Smith2016-08-173-287/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the undefined behaviour (UB) in ilist/ilist_node/etc., mainly by removing (gutting) the ilist_sentinel_traits customization point and canonicalizing on a single, efficient memory layout. This fixes PR26753. The new ilist is a doubly-linked circular list. - ilist_node_base has two ilist_node_base*: Next and Prev. Size-of: two pointers. - ilist_node<T> (size-of: two pointers) is a type-safe wrapper around ilist_node_base. - ilist_iterator<T> (size-of: two pointers) operates on an ilist_node<T>*, and downcasts to T* on dereference. - ilist_sentinel<T> (size-of: two pointers) is a wrapper around ilist_node<T> that has some extra API for list management. - ilist<T> (size-of: two pointers) has an ilist_sentinel<T>, whose address is returned for end(). The new memory layout matches ilist_half_embedded_sentinel_traits<T> exactly. The Head pointer that previously lived in ilist<T> is effectively glued to the ilist_half_node<T> that lived in ilist_half_embedded_sentinel_traits<T>, becoming the Next and Prev in the ilist_sentinel_node<T>, respectively. sizeof(ilist<T>) is now the size of two pointers, and there is never any additional storage for a sentinel. This is a much simpler design for a doubly-linked list, removing most of the corner cases of list manipulation (add, remove, etc.). In follow-up commits, I intend to move as many algorithms as possible into a non-templated base class (ilist_base) to reduce code size. Moreover, this fixes the UB in ilist_iterator/getNext/getPrev operations. Previously, ilist_iterator<T> operated on a T*, even when the sentinel was not of type T (i.e., ilist_embedded_sentinel_traits and ilist_half_embedded_sentinel_traits). This added UB to all operations involving end(). Now, ilist_iterator<T> operates on an ilist_node<T>*, and only downcasts when the full type is guaranteed to be T*. What did we lose? There used to be a crash (in some configurations) on ++end(). Curiously (via UB), ++end() would return begin() for users of ilist_half_embedded_sentinel_traits<T>, but otherwise ++end() would cause a nice dependable nullptr dereference, crashing instead of a possible infinite loop. Options: 1. Lose that behaviour. 2. Keep it, by stealing a bit from Prev in asserts builds. 3. Crash on dereference instead, using the same technique. Hans convinced me (because of the number of problems this and r278532 exposed on Windows) that we really need some assertion here, at least in the short term. I've opted for #3 since I think it catches more bugs. I added only a couple of unit tests to root out specific bugs I hit during bring-up, but otherwise this is tested implicitly via the extensive usage throughout LLVM. Planned follow-ups: - Remove ilist_*sentinel_traits<T>. Here I've just gutted them to prevent build failures in sub-projects. Once I stop referring to them in sub-projects, I'll come back and delete them. - Add ilist_base and move algorithms there. - Check and fix move construction and assignment. Eventually, there are other interesting directions: - Rewrite reverse iterators, so that rbegin().getNodePtr()==&*rbegin(). This allows much simpler logic when erasing elements during a reverse traversal. - Remove ilist_traits::createNode, by deleting the remaining API that creates nodes. Intrusive lists shouldn't be creating nodes themselves. - Remove ilist_traits::deleteNode, by (1) asserting that lists are empty on destruction and (2) changing API that calls it to take a Deleter functor (intrusive lists shouldn't be in the memory management business). - Reconfigure the remaining callback traits (addNodeToList, etc.) to be higher-level, pulling out a simple_ilist<T> that is much easier to read and understand. - Allow tags (e.g., ilist_node<T,tag1> and ilist_node<T,tag2>) so that T can be a member of multiple intrusive lists. llvm-svn: 278974
* Revert "[WebAssembly] Handle debug information and virtual registers without ↵Duncan P. N. Exon Smith2016-08-174-80/+3
| | | | | | | | | | crashing" This reverts commit r278967, since the new test is failing when you don't build the WebAssembly target (most people, since it's off-by-default). llvm-svn: 278973
* [OpenCL] AMDGPU: add support of cl_khr_subgroupsYaxun Liu2016-08-173-1/+11
| | | | | | | | Patch by Aaron En Ye Shi. Differential Revision: https://reviews.llvm.org/D23573 llvm-svn: 278972
* [docs] Adding "new target" rules to dev policyRenato Golin2016-08-171-0/+83
| | | | | | | | Making explicit our current policy to accept new targets as experimental and later official. Every new target should follow these rules to be added, and kept relevant in the upstream tree. llvm-svn: 278971
* Replace a few more "fall through" comments with LLVM_FALLTHROUGHJustin Bogner2016-08-1752-161/+209
| | | | | | Follow up to r278902. I had missed "fall through", with a space. llvm-svn: 278970
* GlobalISel: support irtranslation of icmp instructions.Tim Northover2016-08-1718-38/+198
| | | | llvm-svn: 278969
* Add a test for clang-tidy using the clang-cl driver.Zachary Turner2016-08-171-0/+17
| | | | | | | Reviewed By: alexfh Differential Revision: https://reviews.llvm.org/D23480 llvm-svn: 278968
* [WebAssembly] Handle debug information and virtual registers without crashingDominic Chen2016-08-174-3/+80
| | | | | | | | | | | | Summary: Currently, enabling debug information when compiling for WebAssembly crashes the backend. This commit fixes these by skipping debug values in backend passes. Reviewers: jfb, aprantl, dschuff, echristo Subscribers: mehdi_amini, yurydelendik, dexonsmith, MatzeB, jfb, dschuff, llvm-commits Differential Revision: https://reviews.llvm.org/D21808 llvm-svn: 278967
* [GraphWriter] Change GraphWriter to use NodeRef in GraphTraitsTim Shen2016-08-175-18/+19
| | | | | | | | | | | | | | | Summary: This is part of the "NodeType* -> NodeRef" migration. Notice that since GraphWriter prints object address as identity, I added a static_assert on NodeRef to be a pointer type. Reviewers: dblaikie Subscribers: llvm-commits, MatzeB Differential Revision: https://reviews.llvm.org/D23580 llvm-svn: 278966
* AMDGPU: Remove dead optionMatt Arsenault2016-08-171-6/+0
| | | | llvm-svn: 278965
* [Tooling] Parse compilation database command lines on Windows.Zachary Turner2016-08-171-0/+18
| | | | | | | | | | | | | When a compilation database is used on Windows, the command lines cannot be parsed using the standard GNU style syntax. LLVM provides functions for parsing Windows style command lines, so use them where appropriate. After this patch, clang-tidy runs correctly on Windows. Reviewed by: alexfh Differential Revision: https://reviews.llvm.org/D23455 llvm-svn: 278964
* [GraphWriter] Change GraphWriter to use NodeRef in GraphTraitsTim Shen2016-08-171-0/+1
| | | | | | | | | | | | Summary: Corresponding LLVM patch: D23580 Reviewers: dblaikie Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23581 llvm-svn: 278963
* Implement vstore_half{,n}Jan Vesely2016-08-173-19/+68
| | | | | Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 278962
* [GenericDomTree] Change GenericDomTree to use NodeRef in GraphTraits. NFC.Tim Shen2016-08-175-87/+91
| | | | | | | | | | | | | | | | | | Summary: Looking at the implementation, GenericDomTree has more specific requirements on NodeRef, e.g. NodeRefObject->getParent() should compile, and NodeRef should be a pointer. We can remove the pointer requirement, but it seems to have little gain, given the limited use cases. Also changed GraphTraits<Inverse<Inverse<T>> to be more accurate. Reviewers: dblaikie, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23593 llvm-svn: 278961
* [InstCombine] minimize tests and autogenerate checksSanjay Patel2016-08-171-32/+34
| | | | llvm-svn: 278960
* Split DescribeAddressIfGlobal between a function that gets all the ↵Filipe Cabecinhas2016-08-176-109/+115
| | | | | | | | | | | | | | | | | | information, and one that prints it. Summary: Replacement for part of D23518 This deals with global variable addresses. (This commit is written on top of D23605, but can be applied by itself) Reviewers: kcc, samsonov Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D23607 llvm-svn: 278959
* Split DescribeAddressIfStack between a function that gets all the ↵Filipe Cabecinhas2016-08-174-109/+142
| | | | | | | | | | | | | | | | information, and one that prints it. Summary: Replacement for part of D23518 This deals with stack addresses. Reviewers: kcc, samsonov Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D23605 llvm-svn: 278958
* [InstCombine] more clean up of foldICmpXorConstant(); NFCISanjay Patel2016-08-171-27/+21
| | | | | | | Use m_APInt for the xor constant, but this is all still guarded by the initial ConstantInt check, so no vector types should make it in here. llvm-svn: 278957
* [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl.Akira Hatanaka2016-08-172-12/+35
| | | | | | | | | | Check that ExpandStructures is true before visiting the list of ivars. rdar://problem/27135221 Differential revision: https://reviews.llvm.org/D22929 llvm-svn: 278956
* [InstCombine] clean up foldICmpXorConstant(); NFCISanjay Patel2016-08-171-55/+60
| | | | | | | | 1. Change variable names 2. Use local variables to reduce code 3. Early exit to reduce indent llvm-svn: 278955
* Fix for PR29010Marina Yatsina2016-08-172-1/+17
| | | | | | | | | | | This is a fix for https://llvm.org/bugs/show_bug.cgi?id=29010 Root cause of the bug is that the register class of the machine instruction operand does not fully reflect if this registers that can be allocated. Both for i386 and x86_64 the operand's register class is VR128RegClass and thus contains xmm0-xmm15, though in i386 we can only use xmm0-xmm8. In order to get the actual allocable registers of the class we need to use RegisterClassInfo. Differential Revision: https://reviews.llvm.org/D23613 llvm-svn: 278954
* Merge readAt and readAlign.Rui Ueyama2016-08-171-28/+14
| | | | | | Now that they are identical. llvm-svn: 278953
* Module debug info: Fix a bug in handling record decls without fields.Adrian Prantl2016-08-174-7/+47
| | | | | | | | | | | The previous condition would erroneously mark all CXXRecordDecls that didn't have any fields as being defined in a clang module. This patch fixes the condition to only apply to explicit template instantiations. <rdar://problem/27771823> llvm-svn: 278952
* cleanup: fixed names of dummy arguments of Fortran interfaces declarations, ↵Andrey Churbanov2016-08-174-138/+158
| | | | | | no functional changes done llvm-svn: 278951
* [libFuzzer] more mutationsKostya Serebryany2016-08-173-18/+124
| | | | llvm-svn: 278950
* [Include-fixer] Install executables and support scriptsEugene Zelenko2016-08-172-3/+25
| | | | | | Differential revision: https://reviews.llvm.org/D23045 llvm-svn: 278949
* Move tests to the appropriate subdirectory.Adrian Prantl2016-08-173-0/+0
| | | | llvm-svn: 278948
* Correct makefile.rules to use arm/aarch64 target specific AR and OBJCOPYOmair Javaid2016-08-171-22/+27
| | | | | | Differential revision: https://reviews.llvm.org/D20386 llvm-svn: 278947
* Simplify condition. (NFC)Adrian Prantl2016-08-171-7/+8
| | | | llvm-svn: 278946
* [InstCombine] use m_APInt to allow icmp (or X, Y), C folds for splat ↵Sanjay Patel2016-08-173-19/+7
| | | | | | | | | | constant vectors This is a sibling of: https://reviews.llvm.org/rL278859 https://reviews.llvm.org/rL278935 llvm-svn: 278945
* [InstCombine] clean up foldICmpOrConstant(); NFCISanjay Patel2016-08-171-18/+16
| | | | | | | | | 1. Change variable names 2. Use local variables to reduce code 3. Use ? instead of if/else 4. Use the APInt variable instead of 'RHS' so the removal of the FIXME code will be direct llvm-svn: 278944
* [InstCombine] add tests for missing vector icmp foldsSanjay Patel2016-08-171-0/+30
| | | | llvm-svn: 278943
* Debug info: Mark noreturn functions with DIFlagNoReturn.Adrian Prantl2016-08-172-3/+10
| | | | | | | | | | | This affects functions with the C++11 [[ noreturn ]] and C11 _Noreturn specifiers. Patch by Victor Leschuk! https://reviews.llvm.org/D23168 llvm-svn: 278942
* [analyzer] Add a checker for loss of sign or precision in integral casts.Artem Dergachev2016-08-174-0/+322
| | | | | | | | | | | | | | | This new checker tries to find execution paths on which implicit integral casts cause definite loss of information: a certainly-negative integer is converted to an unsigned integer, or an integer is definitely truncated to fit into a smaller type. Being implicit, such casts are likely to produce unexpected results. Patch by Daniel Marjamäki! Differential Revision: https://reviews.llvm.org/D13126 llvm-svn: 278941
OpenPOWER on IntegriCloud