summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Reverted r333424 as it broke multiple build bots and left unfixed for a long ↵Galina Kistanova2018-05-303-74/+4
| | | | | | time llvm-svn: 333578
* [GlobalISel][Legalizer] LegalizerInfo verifier: check rules cover type indicesRoman Tereshin2018-05-302-13/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a simple verifier that tracks type indices being touched by legalization rules' builders. Every target will now have an opportunity to call LegalizerInfo::verify(...) at the end of its derived LegalizerInfo's constructor and check there are no obvious mistakes like checking only first type for an opcode that has more than one type index and therefore implicitly declaring any type for the second (and higher) type index legal. The check is only ran in assert builds and should have very minor performance impact in assert builds and none in release builds. This commit does not add LegalizerInfo::verify(...) calls to target-specific legalizers, look for separate commits for that. This commit also doesn't make the verification errors fatal, only produces an error message, look for a later commit that does. Reviewers: aemerson, qcolombet Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D46338 llvm-svn: 333576
* [AST] Fix loss of enum forward decl from decl contextJoel E. Denny2018-05-303-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | For example, given: enum __attribute__((deprecated)) T *p; -ast-print produced: enum T *p; The attribute was lost because the enum forward decl was lost. Another example is the loss of enum forward decls from C++ namespaces (in MS compatibility mode). The trouble was that the EnumDecl node was suppressed, as revealed by -ast-dump. The suppression of the EnumDecl was intentional in r116122, but I don't understand why. The suppression isn't needed for the test suite to behave. Reviewed by: rsmith Differential Revision: https://reviews.llvm.org/D46846 llvm-svn: 333574
* [X86] Update the fast-isel tests for _mm_rcp_ss, _mm_rsqrt_ss, and ↵Craig Topper2018-05-301-27/+3
| | | | | | _mm_sqrt_ss to match clang codegen after r333572. llvm-svn: 333573
* [X86] Simplify the implementation of _mm_sqrt_ss, _mm_rcp_ss, and _mm_rsqrt_ss.Craig Topper2018-05-302-31/+4
| | | | | | | | We don't need the insertion back into the original vector at the end. The builtin already understands that. This is different than _mm_sqrt_sd which takes two arguments and we do need to insert. llvm-svn: 333572
* [WebAssembly] Initial support for LTOSam Clegg2018-05-3026-21/+674
| | | | | | Differential Revision: https://reviews.llvm.org/D47162 llvm-svn: 333570
* [X86] Reduce the number of setzero intrinsics to just the set defined by the ↵Craig Topper2018-05-3013-185/+150
| | | | | | | | | | Intel Intrinsics Guide. We had quite a few for different element sizes of integers sometimes with strange target features attached to them. We only need a single version for each of _m128i, _m256i, and _m512i with the target feature that first introduced those types. llvm-svn: 333568
* [ELF] Remove -m argument to lld in test files. NFC.Sam Clegg2018-05-3065-98/+99
| | | | | | | | | | | This should be correctly implied by the linker. This also makes the tests slightly easier to maintain and compare with the equivalent tests under for other platforms. Differential Revision: https://reviews.llvm.org/D47513 llvm-svn: 333567
* [dsymutil] Escape HTML special characters in plist.Jonas Devlieghere2018-05-304-10/+40
| | | | | | | | | | When printing string in the Plist, we weren't escaping the characters which lead to invalid XML. This patch adds the escape logic to StringExtras. rdar://39785334 llvm-svn: 333565
* [X86] Remove 'return' from a bunch of intrinsics that return void and use a ↵Craig Topper2018-05-309-19/+19
| | | | | | | | builtin that returns void. Found by running the intrinsic headers through -pedantic -ansi. llvm-svn: 333563
* [GlobalISel][Legalizer] NFC mostly reducing LegalizeRuleSet's methods' ↵Roman Tereshin2018-05-301-49/+55
| | | | | | | | | | | | | | | | inter-dependecies Making LegalizeRuleSet's implementation a little more dumb and straightforward to make it easier to read and change, in particular in order to add the initial version of LegalizerInfo verifier Reviewers: aemerson, qcolombet Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D46338 llvm-svn: 333562
* [X86][AVX512BW] Fixed check prefix copy+paste typo in avx512bw-intrinsics.llSimon Pilgrim2018-05-301-570/+570
| | | | | | Prefix was for AVX512F instead of AVX512BW llvm-svn: 333560
* [AMDGPU][Waitcnt] Fix build error: unused variable 'SWaitInst'Mark Searles2018-05-301-6/+2
| | | | | | | | | | | | | | https://reviews.llvm.org/rL333556 caused a buildbot failure. See http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/21876/steps/build_Lld/logs/stdio /Users/buildslave/as-bldslv9/lld-x86_64-darwin13/llvm.src/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:2007:10: error: unused variable 'SWaitInst' [-Werror,-Wunused-variable] auto SWaitInst = BuildMI(EntryBB, EntryBB.getFirstNonPHI(), The unused variable was for debugging purposes; removing that piece of code to fix the build. llvm-svn: 333559
* AMDGPU: Use better alignment for kernarg loweringMatt Arsenault2018-05-306-159/+116
| | | | | | | | | | This was just emitting loads with the ABI alignment for the raw type. The true alignment is often better, especially when an illegal vector type was scalarized. The better alignment allows using a scalar load more often. llvm-svn: 333558
* [ValueTracking] Fix endless recursion in isKnownNonZero()Karl-Johan Karlsson2018-05-302-4/+40
| | | | | | | | | | | | | | | | | | | | | Summary: The isKnownNonZero() function have checks that abort the recursion when it reaches the specified max depth. However one of the recursive calls was placed before the max depth check was done, resulting in a endless recursion that eventually triggered a segmentation fault. Fixed the problem by moving the max depth check above the first recursive call. Reviewers: Prazek, nlopes, spatel, craig.topper, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, bjope, llvm-commits Differential Revision: https://reviews.llvm.org/D47531 llvm-svn: 333557
* [AMDGPU][Waitcnt] Fix handling of loops with many bottom blocksMark Searles2018-05-302-19/+57
| | | | | | | | | | | | | In terms of waitcnt insertion/if necessary, the waitcnt pass forces convergence for a loop. Previously, that kicked if greater than 2 passes over a loop, which doesn't account for loop with many bottom blocks. So, increase the threshold to (n+1), where n is the number of bottom blocks. This gives the pass an opportunity to consider the contribution of each bottom block, to the overall loop, before the forced convergence potentially kicks in. Differential Revision: https://reviews.llvm.org/D47488 llvm-svn: 333556
* [X86] Lowering FMA intrinsics to native IR (Clang part)Gabor Buella2018-05-309-1233/+2453
| | | | | | | | | | | | | | | | This patch replaces all packed (and scalar without rounding mode) fused intrinsics with fmadd/fmaddsub variations. Then fmadd/fmaddsub are lowered to native IR. Patch by tkrupa Reviewers: craig.topper, sroland, spatel, RKSimon Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D47444 llvm-svn: 333555
* [X86] Lowering FMA intrinsics to native IR (LLVM part)Gabor Buella2018-05-3011-234/+9936
| | | | | | | | | | | | | | | | | | | | | | | | Support for Clang lowering of fused intrinsics. This patch: 1. Removes bindings to clang fma intrinsics. 2. Introduces new LLVM unmasked intrinsics with rounding mode: int_x86_avx512_vfmadd_pd_512 int_x86_avx512_vfmadd_ps_512 int_x86_avx512_vfmaddsub_pd_512 int_x86_avx512_vfmaddsub_ps_512 supported with a new intrinsic type (INTR_TYPE_3OP_RM). 3. Introduces new x86 fmaddsub/fmsubadd folding. 4. Introduces new tests for code emitted by sequentions introduced in Clang part. Patch by tkrupa Reviewers: craig.topper, sroland, spatel, RKSimon Reviewed By: craig.topper, RKSimon Differential Revision: https://reviews.llvm.org/D47443 llvm-svn: 333554
* [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in nameBen Hamilton2018-05-303-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Please take a close look at this CL. I haven't touched much of `UnwrappedLineParser` before, so I may have gotten things wrong. Previously, clang-format would incorrectly format the following: ``` @implementation Foo - (Class)class { } - (void)foo { } @end ``` as: ``` @implementation Foo - (Class)class { } - (void)foo { } @end ``` The problem is whenever `UnwrappedLineParser::parseStructuralElement()` sees any of the keywords `class`, `struct`, or `enum`, it calls `parseRecord()` to parse them as a C/C++ record. This causes subsequent lines to be parsed incorrectly, which causes them to be indented incorrectly. In Objective-C/Objective-C++, these keywords are valid selector components. This diff fixes the issue by explicitly handling `+` and `-` lines inside `@implementation` / `@interface` / `@protocol` blocks and parsing them as Objective-C methods. Test Plan: New tests added. Ran tests with: make -j16 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: jolesiak, klimek Reviewed By: jolesiak, klimek Subscribers: klimek, cfe-commits, Wizard Differential Revision: https://reviews.llvm.org/D47095 llvm-svn: 333553
* [LLDB] Re-apply r303907 that's reverted by mistakeTim Shen2018-05-302-7/+13
| | | | llvm-svn: 333552
* [AliasSet] Teach the alias set how to handle atomic memcpy/memmove/memsetDaniel Neilson2018-05-303-12/+92
| | | | | | | | | Summary: The atomic variants of the memcpy/memmove/memset intrinsics can be treated the same was as the regular forms, with respect to aliasing. Update the AliasSetTracker to treat the atomic forms the same was as the regular forms. llvm-svn: 333551
* [InstCombine, ARM, AArch64] Convert table lookup to shuffle vectorAlexandros Lamprineas2018-05-303-0/+146
| | | | | | | | | | | Turning a table lookup intrinsic into a shuffle vector instruction can be beneficial. If the mask used for the lookup is the constant vector {7,6,5,4,3,2,1,0}, then the back-end generates byte reverse instructions instead. Differential Revision: https://reviews.llvm.org/D46133 llvm-svn: 333550
* [X86][AVX512] Replace -cpu=knl with -mattr=+avx512f for avx512-intrinsics testsSimon Pilgrim2018-05-302-64/+127
| | | | | | | | It was noticed on D47377 that these tests were being unnecessarily affected by scheduler changes. This adds vzeroupper at the end of some tests as we lose the 'FeatureFastPartialYMMorZMMWrite' feature from KNL, since Skylake+ don't support this its probably better. llvm-svn: 333549
* [clangd] Add forgotten include guard to TestFS.h. NFCIlya Biryukov2018-05-301-0/+3
| | | | llvm-svn: 333548
* Revert "Update NRVO logic to support early return"Sam McCall2018-05-3011-290/+82
| | | | | | This reverts commit r333500, which causes stage2 compiler crashes. llvm-svn: 333547
* [X86][SSE] Remove unnecessary -cpu from sttni testsSimon Pilgrim2018-05-301-16/+16
| | | | | | It was noticed on D47377 that these tests (for PR37246) were being unnecessarily affected by scheduler changes. llvm-svn: 333546
* [X86][SSE] Replace -cpu with equivalent -mattr for vec_cast testsSimon Pilgrim2018-05-303-6/+6
| | | | | | It was noticed on D47377 that these tests were being unnecessarily affected by scheduler changes. llvm-svn: 333545
* [ARM] Remove code handling ADDC/ADDE/SUBC/SUBEAmaury Sechet2018-05-301-30/+0
| | | | | | | | | | | | Summary: This code is now dead as the ARM backend uses ADDCARRY/SUBCARRY/SETCCCARRY . Reviewers: rogfer01, efriedma, rengolin, javed.absar Subscribers: kristof.beyls, chrib, llvm-commits Differential Revision: https://reviews.llvm.org/D47413 llvm-svn: 333544
* [Hexagon] Use vector align-left when shift amount fits in 3 bitsKrzysztof Parzyszek2018-05-305-62/+39
| | | | | | | This saves an instruction because for align-right the shift amount would need to be put in a register first. llvm-svn: 333543
* [mips] Correct the definition of CTC2/CFC2Simon Dardis2018-05-301-8/+6
| | | | llvm-svn: 333542
* [mips] Correct the predicates of microMIPS compact branch instructionsSimon Dardis2018-05-301-6/+4
| | | | llvm-svn: 333541
* [FileSpec] Re-implmenet removeLastPathComponentJonas Devlieghere2018-05-303-30/+57
| | | | | | | | | | | | | | | | | | | | | When reading DBGSourcePathRemapping from a dSYM, we remove the last two path components to make the source lookup more general. However, when dealing with a relative path that has less than 2 components, we ended up with an invalid (empty) FileSpec. This patch changes the behavior of removeLastPathComponent to remove the last path component, if possible. It does this by checking whether a parent path exists, and if so using that as the new path. We rely entirely on LLVM's path implementation to do the heavy lifting. We now also return a boolean which indicates whether the operator was successful or not. Differential revision: https://reviews.llvm.org/D47495 rdar://37791687 llvm-svn: 333540
* Revert "[clang-format] Fix putting ObjC message arguments in one line for ↵Jacek Olesiak2018-05-302-58/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multiline receiver" Summary: This reverts commit db9e5e9a616d7fdd4d1ba4c3b2cd89d8a0238533 (rC333171). Mentioned change introduced unintended formatting of ObjC code due to split priorities inherited from C/C++, e.g.: ``` fooooooo = [ [obj fooo] aaa:42 aaa:42]; ``` instead of ``` fooooooo = [[obj fooo] aaa:42 aaa:42]; ``` when formatted with ColumnLimit = 30. Reviewers: krasimir Reviewed By: krasimir Subscribers: benhamilton, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D47527 llvm-svn: 333539
* [Sema] Don't skip function bodies with 'auto' without trailing return typeIlya Biryukov2018-05-303-2/+78
| | | | | | | | | | | | | | | | | | Summary: Skipping them was clearly not intentional. It's impossible to guarantee correctness if the bodies are skipped. Also adds a test case for r327504, now that it does not produce invalid errors that made the test fail. Reviewers: aaron.ballman, sammccall, rsmith Reviewed By: rsmith Subscribers: rayglover-ibm, rwols, cfe-commits Differential Revision: https://reviews.llvm.org/D44480 llvm-svn: 333538
* [clangd] clang-format the source code. NFCIlya Biryukov2018-05-307-30/+29
| | | | llvm-svn: 333537
* [mips] Sink PredicateControl further down the class hierarchy.Simon Dardis2018-05-3011-68/+59
| | | | | | | | | | | | | | | | Previously PredicateControl in some cases was a member of <X>Inst classes for some X (DSP, EVA) or was in more irregular place in the hierarchry for any given instruction. This patch moves PredicateControl down to the root so that it is consistently available. Then correct the base class of microMIPS instructions as using EncodingPredicates instead of the general Predicates field of Instruction. Reviewers: smaksimovic, abeserminji, atanasyan Differential Revision: https://reviews.llvm.org/D47526 llvm-svn: 333536
* Revert "Reland "[clangd] Adapt file migration in r332720""Eric Liu2018-05-302-2/+1
| | | | | | This reverts commit r333533. llvm-svn: 333535
* Revert "Reland "Move #include manipulation code to new lib/Tooling/Inclusions.""Eric Liu2018-05-3012-31/+15
| | | | | | This reverts commit r333532. Revert for now to fix an internal bot issue. llvm-svn: 333534
* Reland "[clangd] Adapt file migration in r332720"Eric Liu2018-05-302-1/+2
| | | | | | This reverts commit r332752 (i.e. reland r332721). llvm-svn: 333533
* Reland "Move #include manipulation code to new lib/Tooling/Inclusions."Eric Liu2018-05-3012-15/+31
| | | | | | | | | This reverts commit r332751 (i.e. reland r332720) after fixing module build. Differential Revision: https://reviews.llvm.org/D47068 llvm-svn: 333532
* [analyzer] Remove the redundant check about same state transition in ↵Henry Wong2018-05-301-3/+1
| | | | | | | | | | | | | | | | `ArrayBoundCheckerV2.cpp`. Summary: Since the `addTransitionImpl()` has a check about same state transition, there is no need to check it in `ArrayBoundCheckerV2.cpp`. Reviewers: NoQ, xazax.hun, george.karpenkov Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, cfe-commits, MTC Differential Revision: https://reviews.llvm.org/D47451 llvm-svn: 333531
* [mips] Correct the predicates of arithmetic and logic instructions.Simon Dardis2018-05-308-50/+93
| | | | | | | | | | | | As part of this effort, duplicate and correct the predicates of some aliases. Also disable code generation of some short form instructions for FastISel, as it would otherwise reject them. Reviewers: atanasyan, abeserminji, smaksimovic Differential Revision: https://reviews.llvm.org/D47075 llvm-svn: 333530
* Fix a (possible) division by zero check in the CmpRuns scriptMikhail R. Gadelha2018-05-301-1/+1
| | | | | | I missed updating the check in r333375 llvm-svn: 333529
* [clangd] Enable parsing of non-doxygen comments in global-symbol-builderIlya Biryukov2018-05-301-0/+6
| | | | | | | | | | | | Reviewers: ioeric, sammccall Reviewed By: ioeric Subscribers: klimek, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47065 llvm-svn: 333528
* [YAML] Quote multiline string scalarsIlya Biryukov2018-05-302-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Otherwise, the YAML parser breaks when trying to read them back in 'key: multiline_string_value' cases. This patch fixes a problem when serializing structs which contain multi-line strings. E.g., if we try to serialize the following struct ``` { "key1": "first line\nsecond line", "key2": "another string" }` ``` Before this patch, we got the YAML output that failed to parse: ``` key1: first line second line key2: another string ``` After the patch, we get: ``` key1: 'first line second line' key2: another string ``` Reviewers: sammccall Reviewed By: sammccall Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47468 llvm-svn: 333527
* @skipUnlessDarwin TestOrderedSetPavel Labath2018-05-301-0/+1
| | | | llvm-svn: 333526
* AArch64: print correct annotation for ADRP addresses.Tim Northover2018-05-302-2/+11
| | | | | | | The immediate on an ADRP MCInst needs to be multiplied by 0x1000 to obtain the actual PC-offset that will be calculated. llvm-svn: 333525
* [AArch64][AsmParser] Fix segfault on illegal fpimm.Sander de Smalen2018-05-302-2/+7
| | | | | | | | | | | | | Floating point immediate combining a negative sign and a hexadecimal number, e.g. #-0x0 caused the compiler to crash. Reviewers: rengolin, fhahn, samparker, SjoerdMeijer, javed.absar Reviewed By: javed.absar Differential Revision: https://reviews.llvm.org/D47483 llvm-svn: 333524
* [Sparc] Treat %fxx registers with value type Other as single precisionDaniel Cederman2018-05-301-1/+1
| | | | | | | They get type Other when used in the clobber list in inline assembly. This fixes tests fp128.ll and float.ll that failed after r333512. llvm-svn: 333523
* [ASTImporter] Corrected lookup at import of templated record declGabor Marton2018-05-302-1/+52
| | | | | | | | | | | | | | | | | | Summary: When a CXXRecordDecl under ClassTemplateDecl is imported, check the templated record decl for similarity instead of the template. Reviewers: a.sidorin Reviewed By: a.sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D47313 Patch by Balazs Keri! llvm-svn: 333522
OpenPOWER on IntegriCloud