summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Adds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside ↵Ben Hamilton2019-07-225-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NS_ENUM and CF_ENUM. Summary: Addresses the formatting of NS_CLOSED_ENUM and CF_CLOSED_ENUM, introduced in Swift 5. Before: ``` typedef NS_CLOSED_ENUM(NSInteger, Foo){FooValueOne = 1, FooValueTwo, FooValueThree}; ``` After: ``` typedef NS_CLOSED_ENUM(NSInteger, Foo) { FooValueOne = 1, FooValueTwo, FooValueThree }; ``` Contributed by heijink. Reviewers: benhamilton, krasimir Reviewed By: benhamilton Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65012 llvm-svn: 366719
* Delete empty fileJonas Hahnfeld2019-07-221-0/+0
| | | | | | This is a left-over from r356288 which was reviewed in D58989. llvm-svn: 366716
* [AMDGPU] Test update. NFC.Stanislav Mekhanoshin2019-07-221-26/+26
| | | | llvm-svn: 366715
* [SLPVectorizer] Fix some MSVC/cppcheck uninitialized variable warnings. NFCI.Simon Pilgrim2019-07-221-3/+3
| | | | llvm-svn: 366712
* Revert "Reland [ELF] Loose a condition for relocation with a symbol"Vlad Tsyrklevich2019-07-226-9/+20
| | | | | | | This reverts commit r366686 as it appears to be causing buildbot failures on sanitizer-x86_64-linux-android and sanitizer-x86_64-linux. llvm-svn: 366708
* [Windows] Fix race condition between state changesAdrian McCarthy2019-07-221-11/+10
| | | | | | | | | | | | | | | Patch by Martin Andersson (martin.andersson@evoma.se) If the process is resumed before the state is changed to "running" there is a possibility (when single stepping) that the debugger stops and changes the state to "stopped" before it is first changed to "running". This causes the process to ignore the stop event (since the state did not change) which in turn leads the DebuggerThread to wait indefinitely for the exception predicate in HandleExceptionEvent. Differential Revision: https://reviews.llvm.org/D62183 llvm-svn: 366703
* [OPENMP][MSVC]Enable /openmp[:experimental] to compile OpenMP.Alexey Bataev2019-07-222-4/+11
| | | | | | | Mapped /openmp[:experimental] to -fopenmp option and /openmp- option to -fno-openmp llvm-svn: 366702
* [libunwind][ARM] Fix types in _Unwind_VRS_Get.Mikhail Maltsev2019-07-221-2/+2
| | | | | | | | | This is a small fix for https://reviews.llvm.org/D64996. The types of w0 and w1 in _Unwind_VRS_Get must be uint64_t, not uint32_t. Committing as obvious. llvm-svn: 366701
* [libc++] Do not infer support for C++17 in GCC < 7Louis Dionne2019-07-221-0/+1
| | | | | | | | | | | | | | | | | | libc++'s lit configuration infers the C++ language dialect when it is not provided by checking which -std= flags that a compiler supports. GCC 5 and GCC 6 have a -std=c++17 flag, however, they do not have full C++17 support. The lit configuration has hardcoded logic that removes -std=c++1z as an option to test for GCC < 7, but not -std=c++17. This leads to a bunch of failures when running libc++ tests with GCC 5 or GCC 6. This patch adds -std=c++17 to the list of flags that are discarded for GCC < 7 by lit's language dialect inference. Thanks to Bryce Adelstein Lelbach for the patch. Differential Revision: https://reviews.llvm.org/D62874 llvm-svn: 366700
* [X86] Remove const from some intrinsics that shouldn't have themPaul Robinson2019-07-221-3/+3
| | | | llvm-svn: 366699
* [clangd] Add dlog()s for SelectionTree, enabling -debug-only=SelectionTree.cppSam McCall2019-07-223-32/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: SelectionTree is a RecursiveASTVisitor which processes getSourceRange() for every node. This is a lot of surface area with the AST, as getSourceRange() is specialized for *many* node types. And the resulting SelectionTree depends on the source ranges of many visited nodes, and the order of traversal. Put together, this means we really need a traversal log to debug when we get an unexpected SelectionTree. I've built this ad-hoc a few times, now it's time to check it in. Example output: ``` D[14:07:44.184] Computing selection for </usr/local/google/home/sammccall/test.cc:1:7, col:8> D[14:07:44.184] push: VarDecl const auto x = 42 D[14:07:44.184] claimRange: </usr/local/google/home/sammccall/test.cc:1:12, col:13> D[14:07:44.184] push: NestedNameSpecifierLoc (empty NestedNameSpecifierLoc) D[14:07:44.184] pop: NestedNameSpecifierLoc (empty NestedNameSpecifierLoc) D[14:07:44.184] push: QualifiedTypeLoc const auto D[14:07:44.184] pop: QualifiedTypeLoc const auto D[14:07:44.184] claimRange: </usr/local/google/home/sammccall/test.cc:1:7, col:11> D[14:07:44.184] hit selection: </usr/local/google/home/sammccall/test.cc:1:7, col:8> D[14:07:44.184] skip: IntegerLiteral 42 D[14:07:44.184] skipped range = </usr/local/google/home/sammccall/test.cc:1:16> D[14:07:44.184] pop: VarDecl const auto x = 42 D[14:07:44.184] claimRange: </usr/local/google/home/sammccall/test.cc:1:1, col:18> D[14:07:44.184] skip: VarDecl int y = 43 D[14:07:44.184] skipped range = </usr/local/google/home/sammccall/test.cc:2:1, col:9> D[14:07:44.184] Built selection tree TranslationUnitDecl VarDecl const auto x = 42 .QualifiedTypeLoc const auto ``` Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65073 llvm-svn: 366698
* [Polly] Clang complains about missing virtual destructorGuillaume Chatelet2019-07-221-0/+2
| | | | | | | | | | | | | | | | Summary: Feel free to reassign if needed. Reviewers: mhalk, bollu, jdoerfert Reviewed By: jdoerfert Subscribers: jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64786 llvm-svn: 366697
* Update c++2a status page with post-Cologne informationMarshall Clow2019-07-221-1/+57
| | | | llvm-svn: 366696
* TableGen: Support physical register inputs > 255Matt Arsenault2019-07-225-12/+32
| | | | | | | This was truncating register value that didn't fit in unsigned char. Switch AMDGPU sendmsg intrinsics to using a tablegen pattern. llvm-svn: 366695
* [NFC] Relaxed regression tests for PR42665Marco Antognini2019-07-221-30/+3
| | | | | | | | Following up on the buildbot failures, this commits relaxes some tests: instead of checking for specific IR output, it now ensures that the underlying issue (the crash), and only that, doesn't happen. llvm-svn: 366694
* ELF: Fix a "memset clearing object of non-trivial type" warningPavel Labath2019-07-222-16/+3
| | | | | | | | Just delete the memset as the ELFHeader constructor already zero-initializes the object. Also clean up the ObjectFileELF constructors/desctructors while I'm in there. llvm-svn: 366692
* [ARM][LowOverheadLoops] Revert remaining pseudosSam Parker2019-07-222-12/+226
| | | | | | | | | | | ARMLowOverheadLoops would assert a failure if it did not find all the pseudo instructions that comprise the hardware loop. Instead of doing this, iterate through all the instructions of the function and revert any remaining pseudo instructions that haven't been converted. Differential Revision: https://reviews.llvm.org/D65080 llvm-svn: 366691
* [OPENMP]Add support for analysis of firstprivate variables.Alexey Bataev2019-07-2226-109/+364
| | | | | | | | | | | | | | | | | | Summary: Firstprivate variables are the variables, for which the private copies must be created in the OpenMP regions and must be initialized with the original values. Thus, we must report if the uninitialized variable is used as firstprivate. Reviewers: NoQ Subscribers: guansong, jdoerfert, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64765 llvm-svn: 366689
* AMDGPU/GlobalISel: Fix broken testsMatt Arsenault2019-07-229-54/+54
| | | | llvm-svn: 366688
* Update documentation for all CERT checks that correspond to a recommendation.Aaron Ballman2019-07-224-5/+31
| | | | | | CERT removed their C++ secure coding recommendations from public view and so the links within that documentation are stale. This updates various pieces of documentation to make this more clear, and to help add substance where our docs deferred to CERT's wiki. llvm-svn: 366687
* Reland [ELF] Loose a condition for relocation with a symbolNikola Prica2019-07-226-20/+9
| | | | | | | | | | | | | | | | | | | This patch was not the reason of the buildbot failure. Deleted code was introduced as a work around for a bug in the gold linker (http://sourceware.org/PR16794). Test case that was given as a reason for this part of code, the one on previous link, now works for the gold. This condition is too strict and when a code is compiled with debug info it forces generation of numerous relocations with symbol for architectures that do not have relocation addend. Reviewers: arsenm, espindola Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D64327 llvm-svn: 366686
* AMDGPU/GlobalISel: Remove unnecessary codeMatt Arsenault2019-07-221-4/+0
| | | | | | | The minnum/maxnum case are dead, and the cvt is handled by the default. llvm-svn: 366685
* [ARM] Fix for MVE VPT block passDavid Green2019-07-225-8/+23
| | | | | | | | | We need to ensure that the number of T's is correct when adding multiple instructions into the same VPT block. Differential revision: https://reviews.llvm.org/D65049 llvm-svn: 366684
* Updated the signature for some stack related intrinsics (CLANG)Christudasan Devadasan2019-07-228-23/+33
| | | | | | | | | | | | | Modified the intrinsics int_addressofreturnaddress, int_frameaddress & int_sponentry. This commit depends on the changes in rL366679 Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D64563 llvm-svn: 366683
* Revert the change to the [[nodiscard]] feature test macro value.Aaron Ballman2019-07-222-2/+2
| | | | | | This value only gets bumped once both P1301 and P1771 are implemented. llvm-svn: 366682
* [X86] EltsFromConsecutiveLoads - support common source loads (REAPPLIED)Simon Pilgrim2019-07-223-249/+178
| | | | | | | | | | | | | | This patch enables us to find the source loads for each element, splitting them into a Load and ByteOffset, and attempts to recognise consecutive loads that are in fact from the same source load. A helper function, findEltLoadSrc, recurses to find a LoadSDNode and determines the element's byte offset within it. When attempting to match consecutive loads, byte offsetted loads then attempt to matched against a previous load that has already been confirmed to be a consecutive match. Next step towards PR16739 - after this we just need to account for shuffling/repeated elements to create a vector load + shuffle. Fixed out of bounds load assert identified in rL366501 Differential Revision: https://reviews.llvm.org/D64551 llvm-svn: 366681
* AMDGPU/GlobalISel: Fix tests without assertsMatt Arsenault2019-07-2212-692/+283
| | | | | | | The legality check is only done under NDEBUG, so the failure cases are different in a release build. llvm-svn: 366680
* Added address-space mangling for stack related intrinsicsChristudasan Devadasan2019-07-2218-26/+37
| | | | | | | | | | | | Modified the following 3 intrinsics: int_addressofreturnaddress, int_frameaddress & int_sponentry. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D64561 llvm-svn: 366679
* [X86][SSE] Add EltsFromConsecutiveLoads test case identified in rL366501Simon Pilgrim2019-07-221-0/+59
| | | | | | Test case that led to rL366441 being reverted at rL366501 llvm-svn: 366678
* [yaml2obj] - Change how we handle implicit sections.George Rimar2019-07-222-37/+41
| | | | | | | | | | | | | Instead of having the special list of implicit sections, that are mixed with the sections read from YAML on late stages, I just create the placeholders and add them to the main sections list early. That allows to significantly simplify the code. Differential revision: https://reviews.llvm.org/D64999 llvm-svn: 366677
* [ARM][test] Improve testsFangrui Song2019-07-2246-253/+249
| | | | | | | Delete trailing 2>&1 that is not piped to another command. Add --no-show-raw-insn to objdump -d commands. llvm-svn: 366676
* [clangd] Set buffer name for main file. NFCISam McCall2019-07-221-5/+6
| | | | llvm-svn: 366675
* [clangd] Log input code of failed highlighting tests. NFCIlya Biryukov2019-07-221-1/+2
| | | | llvm-svn: 366674
* [lldb][NFC] Tablegenify breakpointRaphael Isemann2019-07-224-139/+270
| | | | llvm-svn: 366673
* [AST] Treat semantic form of InitListExpr as implicit code in traversalsIlya Biryukov2019-07-222-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: In particular, do not traverse the semantic form if shouldVisitImplicitCode() returns false. This simplifies the common case of traversals, avoiding the need to worry about some expressions being traversed twice. No tests break after the change, the change would allow to simplify at least one of the usages, i.e. r366070 which had to handle this in clangd. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64762 llvm-svn: 366672
* Add location of SVN staging dir to git-llvm error outputStefan Granitz2019-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In pre-monorepo times the svn staging directory was `.git/svn`. The below error message wasn't mentioning the new name yet. Example before: ``` Can't push git rev 104cfa289d9 because svn status is not empty: ! llvm/trunk/include/llvm ``` Example after: ``` Can't push git rev 104cfa289d9 because status in svn staging dir (.git/llvm-upstream-svn) is not empty: ! llvm/trunk/include/llvm ``` Reviewers: mehdi_amini, jlebar, teemperor Reviewed By: mehdi_amini Subscribers: llvm-commits, #llvm Tags: #llvm Differential Revision: https://reviews.llvm.org/D65038 llvm-svn: 366671
* [OpenCL] Improve destructor support in C++ for OpenCLMarco Antognini2019-07-2217-116/+312
| | | | | | | This re-applies r366422 with a fix for Bug PR42665 and a new regression test. llvm-svn: 366670
* [IPRA][ARM] Make use of the "returned" parameter attributeOliver Stannard2019-07-225-0/+39
| | | | | | | | | | | | ARM has code to recognise uses of the "returned" function parameter attribute which guarantee that the value passed to the function in r0 will be returned in r0 unmodified. IPRA replaces the regmask on call instructions, so needs to be told about this to avoid reverting the optimisation. Differential revision: https://reviews.llvm.org/D64986 llvm-svn: 366669
* [llvm-readobj] - Stop using precompiled objects in file-headers.testGeorge Rimar2019-07-229-394/+624
| | | | | | | | This converts all sub-tests except one to YAML instead of precompiled inputs. Differential revision: https://reviews.llvm.org/D64800 llvm-svn: 366668
* [AMDGPU] Save some work when an atomic op has no usesJay Foad2019-07-221-67/+70
| | | | | | | | | | | | | | | | | | Summary: In the atomic optimizer, save doing a bunch of work and generating a bunch of dead IR in the fairly common case where the result of an atomic op (i.e. the value that was in memory before the atomic op was performed) is not used. NFC. Reviewers: arsenm, dstuttard, tpr Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, t-tye, hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64981 llvm-svn: 366667
* [PowerPC][NFC] Precommit a test case where ppc-mi-peepholes miscompiles extswsliKai Luo2019-07-221-0/+66
| | | | | | Added a test case to show codegen differences. llvm-svn: 366666
* [Loop Peeling] Fix the handling of branch weights of peeled off branches.Serguei Katkov2019-07-223-70/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current algorithm to update branch weights of latch block and its copies is based on the assumption that number of peeling iterations is approximately equal to trip count. However it is not correct. According to profitability check in one case we can decide to peel in case it helps to reduce the number of phi nodes. In this case the number of peeled iteration can be less then estimated trip count. This patch introduces another way to set the branch weights to peeled of branches. Let F is a weight of the edge from latch to header. Let E is a weight of the edge from latch to exit. F/(F+E) is a probability to go to loop and E/(F+E) is a probability to go to exit. Then, Estimated TripCount = F / E. For I-th (counting from 0) peeled off iteration we set the the weights for the peeled latch as (TC - I, 1). It gives us reasonable distribution, The probability to go to exit 1/(TC-I) increases. At the same time the estimated trip count of remaining loop reduces by I. As a result after peeling off N iteration the weights will be (F - N * E, E) and trip count of loop becomes F / E - N or TC - N. The idea is taken from the review of the patch D63918 proposed by Philip. Reviewers: reames, mkuper, iajbar, fhahn Reviewed By: reames Subscribers: hiraditya, zzheng, llvm-commits Differential Revision: https://reviews.llvm.org/D64235 llvm-svn: 366665
* [utils] Clean up UpdateTestChecks/common.pyFangrui Song2019-07-221-6/+6
| | | | llvm-svn: 366664
* [analyzer] Fix -Wunused-function in NDEBUG builds with #ifdef LLVM_DUMP_METHODFangrui Song2019-07-221-2/+4
| | | | llvm-svn: 366663
* [InstCombine] Add foldAndOfICmps test cases inspired by PR42691.Craig Topper2019-07-221-0/+39
| | | | | | | | | | icmp ne %x, INT_MIN can be treated similarly to icmp sgt %x, INT_MIN. icmp ne %x, INT_MAX can be treated similarly to icmp slt %x, INT_MAX. icmp ne %x, UINT_MAX can be treated similarly to icmp ult %x, UINT_MAX. We already treat icmp ne %x, 0 similarly to icmp ugt %x, 0 llvm-svn: 366662
* [PowerPC][NFC] Precomit test case for upcoming patchNemanja Ivanovic2019-07-211-0/+125
| | | | | | | Just committing a test case for an upcoming patch so that the review can show only the codegen differences. llvm-svn: 366661
* [X86] SimplifyDemandedVectorEltsForTargetNode - Move SUBV_BROADCAST ↵Simon Pilgrim2019-07-211-19/+13
| | | | | | | | narrowing handling. NFCI. Move the narrowing of SUBV_BROADCAST to where we handle all the other opcodes. llvm-svn: 366660
* [PowerPC][NFC] Regenerate test using scriptNemanja Ivanovic2019-07-211-28/+161
| | | | | | | This test case ended up as a hybrid of generated checks and manually inserted checks. Regenerate using script to make it consistent. llvm-svn: 366659
* [InstCombine] Update comment I missed in r366649. NFCCraig Topper2019-07-211-1/+1
| | | | llvm-svn: 366658
* [SmallBitVector] Fix bug in find_next_unset for small types with indices >=32Simon Pilgrim2019-07-212-1/+33
| | | | | | | | We were creating a bitmask from a shift of unsigned instead of uintptr_t, meaning we couldn't create masks for indices above 31. Noticed due to a MSVC analyzer warning. llvm-svn: 366657
OpenPOWER on IntegriCloud