summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Disable use of zmm registers for varargs musttail calls under ↵Craig Topper2019-08-122-2/+90
| | | | | | | | | prefer-vector-width=256 and min-legal-vector-width=256. Under this config, the v16f32 type we try to use isn't to a register class so the getRegClassFor call will fail. llvm-svn: 368594
* [ARM] sext of a load is freeDavid Green2019-08-122-14/+35
| | | | | | | | | This teaches the cost model that the sext or zext of a load is going to be free. Differential Revision: https://reviews.llvm.org/D66006 llvm-svn: 368593
* [AMDGPU] Printf runtime binding passStanislav Mekhanoshin2019-08-126-0/+658
| | | | | | | | | | | This pass is a port of the according pass from the HSAIL compiler. It parses printf calls and setup runtime printf buffer. After that it copies printf arguments to the buffer and fills in module metadata for runtime. Differential Revision: https://reviews.llvm.org/D24035 llvm-svn: 368592
* [ASTDump] Add is_anonymous to VisitCXXRecordDeclShafik Yaghmour2019-08-122-4/+5
| | | | | | | | | Summary: Adding is_anonymous the ASTDump for CXXRecordDecl. This turned out to be useful when debugging some problems with how LLDB creates ASTs from DWARF. Differential Revision: https://reviews.llvm.org/D66028 llvm-svn: 368591
* [clangd] Refactor computation of extracted expr in ExtractVariable tweak. NFCSam McCall2019-08-121-61/+66
| | | | | | | | | | | | | | | | | | | | | | | Summary: This takes this logic out of the Tweak class, and simplifies the signature of the function where the main logic is. The goal is to make it easier to turn into a loop like: for (current = N; current and current->parent are both expr; current = current->parent) if (suitable(current)) return current; return null; Reviewers: SureYeaah Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65333 llvm-svn: 368590
* [ARM] MVE shuffle broadcast costsDavid Green2019-08-122-8/+25
| | | | | | | | | | | A VDUP will perform a vector broadcast in a single instruction. Update the cost model for MVE accordingly. Code originally by David Sherwood. Differential Revision: https://reviews.llvm.org/D63448 llvm-svn: 368589
* Fix multiple lifetime warning messages for range based for loopGabor Horvath2019-08-122-2/+12
| | | | llvm-svn: 368588
* [ARM] Put some of the TTI costmodel behind hasNeon calls.David Green2019-08-128-391/+392
| | | | | | | | | This puts some of the calls in ARMTargetTransformInfo.cpp behind hasNeon() checks, now that we have MVE, and updates all the tests accordingly. Differential Revision: https://reviews.llvm.org/D63447 llvm-svn: 368587
* [ARM] Add or update a number of costmodel tests. NFCDavid Green2019-08-127-793/+2486
| | | | | | | This adds a number of cost model tests for ARM, useful for MVE. It also re-jigs some of the existing tests to make them easier to update and read. llvm-svn: 368586
* [scudo][standalone] Minor correctionsKostya Kortchinsky2019-08-126-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Few corrections with no functional change: - replacing `%zd` with `%zu` all around: the values are unsigned - prefer `MAP_ANONYMOUS` to `MAP_ANON` (it's deprecated) - remove the unused `enum LinkerInitialized` - mark a parameter as `UNUSED` in Fuchsia's `getRandom` - correct the casing of a variable and use `nullptr` instead of 0 for pointers in `list.h` - reorder some `typedef` to be consistent between `signed` and `unsigned` Reviewers: eugenis, vitalybuka, morehouse, hctim Reviewed By: vitalybuka, morehouse Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65660 llvm-svn: 368585
* [XCOFF] Use a single symbolic constant for the size of an embeded name. [NFC]Sean Fertile2019-08-123-13/+13
| | | | | | | | | | Convert SymbolNameSize and SectionNameSize into just `NameSize`. The length of a name embeded in a symbol table entry or section header table entry is length 8 for Sections, Symbols and Files. No need to have a distinct constant for each one. Also removes the Size argument to 'generateStringRef' as the size is always 'XCOFF::NameSize'. llvm-svn: 368584
* [InstCombine] add tests for scalar-select-of-vectors; NFCSanjay Patel2019-08-121-21/+82
| | | | llvm-svn: 368583
* [lldb][NFC] Minor fixes for lldb_private::DiagnosticManagerRaphael Isemann2019-08-121-4/+2
| | | | llvm-svn: 368582
* [clangd] Separate chunks with a space when rendering markdownIlya Biryukov2019-08-122-4/+45
| | | | | | | | | | | | | | | | | | | | | Summary: This results in better rendering of resulting markdown. Especially noticeable in coc.nvim that does not have a visible horizontal spaces around inline code blocks. More details and a screenshot from coc.nvim can be found in https://github.com/clangd/clangd/issues/95. Reviewers: sammccall Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66086 llvm-svn: 368581
* Remove outdated comment about clang not populating src2dst_offsetBenjamin Kramer2019-08-121-1/+0
| | | | | | Clang has been setting this since r174293 (of 2013 vintage). llvm-svn: 368580
* Revert r368339 "[MBP] Disable aggressive loop rotate in plain mode"Hans Wennborg2019-08-1259-3255/+3537
| | | | | | | | | | | | | | | | | | It caused assertions to fire when building Chromium: lib/CodeGen/LiveDebugValues.cpp:331: bool {anonymous}::LiveDebugValues::OpenRangesSet::empty() const: Assertion `Vars.empty() == VarLocs.empty() && "open ranges are inconsistent"' failed. See https://crbug.com/992871#c3 for how to reproduce. > Patch https://reviews.llvm.org/D43256 introduced more aggressive loop layout optimization which depends on profile information. If profile information is not available, the statically estimated profile information(generated by BranchProbabilityInfo.cpp) is used. If user program doesn't behave as BranchProbabilityInfo.cpp expected, the layout may be worse. > > To be conservative this patch restores the original layout algorithm in plain mode. But user can still try the aggressive layout optimization with -force-precise-rotation-cost=true. > > Differential Revision: https://reviews.llvm.org/D65673 llvm-svn: 368579
* [llvm-ar][NFC] Fix buildbotJordan Rupprecht2019-08-121-1/+1
| | | | llvm-svn: 368578
* [lldb] Remove undocumented return value from DiagnosticManager::PutStringRaphael Isemann2019-08-122-5/+4
| | | | | | | | | | | The returned value is currently unused. It also seems to imply that it somehow represents 'printf-style' the number of characters/bytes written to some output stream (which is incorrect, as we only know the actual size of the written message when we have rendered it, e.g. via GetString and DiagnosticManagers have no associated output stream). llvm-svn: 368577
* [llvm-readobj] Downgrade 'PT_DYNAMIC segment offset + size exceeds the size ↵Jordan Rupprecht2019-08-123-9/+11
| | | | | | | | | | | | | | | | | | of the file' from an error to a warning Summary: This allows llvm-readobj to print other useful information for truncated files instead of giving up. Reviewers: jhenderson, grimar, MaskRay Reviewed By: jhenderson, grimar, MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66036 llvm-svn: 368576
* [X86][SSE] Add test showing missing demanded elts PSADBW handlingSimon Pilgrim2019-08-121-0/+26
| | | | llvm-svn: 368575
* Revert r368565: [CodeGen] Do the Simple Early Return in block-placement pass ↵Kang Zhang2019-08-122-41/+8
| | | | | | to optimize the blocks llvm-svn: 368574
* [llvm-ar] Accept file paths with windows format slashesOwen Reynolds2019-08-122-8/+52
| | | | | | | | | | | | | | | The internal representation of llvm-ar archives uses linux style slashes for paths, no matter the OS. In the case of windows this meant file paths input intending to match existing members would only match if linux style slashes where used. This change allows either slash direction to be input by the user. This change includes removing an unnecessary call to normalisePath and moving the call of another. Differential Revision: https://reviews.llvm.org/D65743 llvm-svn: 368573
* [RISCV] Fix ICE in isDesirableToCommuteWithShiftSam Elliott2019-08-122-2/+44
| | | | | | | | | | | | | | | | | | | | | Summary: Ana Pazos reported a bug where we were not checking that an APInt would fit into 64-bits before calling `getSExtValue()`. This caused asserts when compiling large constants, such as i128s, as happens when compiling compiler-rt. This patch adds a testcase and makes the callback less error-prone. Reviewers: apazos, asb, luismarques Reviewed By: luismarques Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66081 llvm-svn: 368572
* [InstCombine] x /c fabs(x) -> copysign(1.0, x)David Bolvansky2019-08-122-11/+39
| | | | | | | | | | | | | | | | | | Summary: x / fabs(x) -> copysign(1.0, x) fabs(x) / x -> copysign(1.0, x) Reviewers: spatel, foad, RKSimon, efriedma Reviewed By: spatel Subscribers: lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65898 llvm-svn: 368570
* [clangd] Added the vscode SemanticHighlighting feature code but did not ↵Johan Vikstrom2019-08-123-5/+115
| | | | | | | | | | | | | | | | enable it in the client. Summary: Added the code for the StaticFeature that must be registered to the client. Also decoding the notification data into objects. Did not register it to the client yet. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65998 llvm-svn: 368568
* [lldb][NFC] Add unit test for lldb_private::DiagnosticManagerRaphael Isemann2019-08-122-0/+195
| | | | llvm-svn: 368567
* [DebugInfo] Remove call sites when eliminating unreachable blocksDavid Stenberg2019-08-122-1/+75
| | | | | | | | | | | | | | | | | | | | | Summary: When eliminating an unreachable block we must remove any call site information for calls residing in the block. This was originally found on a downstream target, and the attached x86 test case was produced by hand-modifying some MIR. Reviewers: aprantl, asowda, NikolaPrica, djtodoro, ivanbaev, vsk Reviewed By: NikolaPrica, vsk Subscribers: vsk, hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D64500 llvm-svn: 368566
* [CodeGen] Do the Simple Early Return in block-placement pass to optimize the ↵Kang Zhang2019-08-122-8/+41
| | | | | | | | | | | | | | | | blocks Summary: In `block-placement` pass, it will create some patterns for unconditional we can do the simple early retrun. But the `early-ret` pass is before `block-placement`, we don't want to run it again. This patch is to do the simple early return to optimize the blocks at the last of `block-placement`. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D63972 llvm-svn: 368565
* [llvm-ar][test] Correct tests marked as expected failsOwen Reynolds2019-08-123-3/+3
| | | | | | | | | | | | | In diff D64802 I marked three tests as expected failures for darwin but James Nagurne saw these fail on his downstream embedded ARM cross compiler. I believe XFAIL: system-darwin should be used instead of using XFAIL: darwin due to the problem being related to the darwin host and not the target. Differential Revision: https://reviews.llvm.org/D65745 llvm-svn: 368564
* [clangd] Remove highlightings coming from non topLevelDecls from included files.Johan Vikstrom2019-08-122-2/+25
| | | | | | | | | | | | | | Summary: It is possible to write include code from other files so that the decls from there do not become topLevelDecls (For example by including methods for a class). These Decls are not filtered by topLevelDecls and therefore SemanticHighlighting must manually check that every SLoc belongs in the main file. Otherwise there can be highlightings appearing in places where they should not. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66083 llvm-svn: 368563
* [CrossTU] User docs: remove temporary limiation with macro expansionGabor Marton2019-08-121-9/+0
| | | | | | D65064, D64635, D64638 pathces solve the issue with macor expansion. llvm-svn: 368562
* [OpenCL] Ignore parentheses for sampler initializationSven van Haastregt2019-08-122-1/+8
| | | | | | | | | | | | The sampler handling logic in SemaInit.cpp would inadvertently treat parentheses around sampler arguments as an implicit cast, leading to an unreachable "can't implicitly cast lvalue to rvalue with this cast kind". Fix by ignoring parentheses once we are in the sampler initializer case. Differential Revision: https://reviews.llvm.org/D66080 llvm-svn: 368561
* Revert r368509 "[CodeGen] Do the Simple Early Return in block-placement pass ↵Hans Wennborg2019-08-123-43/+16
| | | | | | | | | | | | | | | | to optimize the blocks" > In `block-placement` pass, it will create some patterns for unconditional we can do the simple early retrun. > But the `early-ret` pass is before `block-placement`, we don't want to run it again. > This patch is to do the simple early return to optimize the blocks at the last of `block-placement`. > > Reviewed By: efriedma > > Differential Revision: https://reviews.llvm.org/D63972 This also revertes follow-ups r368514 and r368532. llvm-svn: 368560
* Cleanup unused variable.Andrey Churbanov2019-08-121-3/+1
| | | | | | | | | | | This patch fixes problem raised in post-review comments of the https://reviews.llvm.org/D65285. Developers of ittnotify confirmed that dll_path_ptr field of the __itt_global structure is never used by ittnotify library, so it is safe to remove the dll_path array. Differential Revision: https://reviews.llvm.org/D65885 llvm-svn: 368559
* [X86][SSE] ComputeKnownBits - add basic PSADBW handlingSimon Pilgrim2019-08-122-4/+12
| | | | llvm-svn: 368558
* [X86][SSE] Add test showing missing compute known bits PSADBW handlingSimon Pilgrim2019-08-121-0/+18
| | | | | | The upper 48-bits of each i64 element is guaranteed to be zero. llvm-svn: 368557
* NFC. Remove trailing whitespace in testJames Henderson2019-08-121-1/+1
| | | | llvm-svn: 368556
* [llvm-strings] Improve testing of llvm-stringsJames Henderson2019-08-1223-93/+216
| | | | | | | | | | | | | | | | | | | This patch tidies up the llvm-strings testing by: 1. Adding comments to every test. 2. Getting rid of canned input files, and having the tests generate them on the fly (this makes the tests self-contained). 3. Adding missing test coverage. 4. Renaming some tests that weren't clear as to their purpose. 5. Adding extra checking of various cases, formatting etc. 6. Removing a test that didn't seem to have any useful purpose for testing llvm-strings. Reviewed by: rupprecht, grimar, MaskRay Differential Revision: https://reviews.llvm.org/D66015 llvm-svn: 368555
* [InstCombine] foldShiftIntoShiftInAnotherHandOfAndInICmp(): avoid ↵Roman Lebedev2019-08-122-6/+17
| | | | | | | | | | | constantexpr pitfail (PR42962) Instead of matching value and then blindly casting to BinaryOperator just to get the opcode, just match instruction and do no cast. Fixes https://bugs.llvm.org/show_bug.cgi?id=42962 llvm-svn: 368554
* [TargetLowering] SimplifyDemandedBits - call SimplifyMultipleUseDemandedBits ↵Simon Pilgrim2019-08-122-10/+13
| | | | | | for ISD::TRUNCATE llvm-svn: 368553
* [OpenCL] Fix lang mode predefined macros for C++ mode.Anastasia Stulova2019-08-123-126/+119
| | | | | | | | | | | | | In C++ mode we should only avoid adding __OPENCL_C_VERSION__, all other predefined macros about the language mode are still valid. This change also fixes the language version check in the headers accordingly. Differential Revision: https://reviews.llvm.org/D65941 llvm-svn: 368552
* [ASTImporter] Fix for import of friend class template with definition.Balazs Keri2019-08-122-4/+50
| | | | | | | | | | | | | | | | | | | | | | Summary: If there is a friend class template "prototype" (forward declaration) and later a definition for it in the existing code, this existing definition may be not found by ASTImporter because it is not linked to the prototype (under the friend AST node). The problem is fixed by looping over all found matching decls instead of break after the first found one. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65269 llvm-svn: 368551
* [ELF] Remove unnecessary assignment to `isPreemptible` in replaceWithDefined()Fangrui Song2019-08-121-1/+0
| | | | | | | After r368535, it is no longer used in the handling of VER_NDX_LOCAL. Drop it. llvm-svn: 368550
* [clangd] Drop diags from non-written #include.Haojian Wu2019-08-122-2/+15
| | | | | | | | | | | | | | Summary: This would fix that we show weird diagnostics on random lines of the main file. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66074 llvm-svn: 368549
* [CostModel][X86][AArch64] Add some tests for extractvalueRoman Lebedev2019-08-122-0/+152
| | | | | | | In https://reviews.llvm.org/D65148 it is suggested that it should have zero cost, always. llvm-svn: 368548
* Improve codegen for deque.Eric Fiselier2019-08-125-28/+210
| | | | | | | | | | | | | | | | | | | | | | | This patch rewrites a few loops in deque and split_buffer to better optimize the codegen. For constructors like `deque<unsigned char> d(500000, 0);` this patch results in a 2x speedup. The patch improves the codegen in roughly three ways: 1. Changes do { ... } while (...) loops into more typical for loops. The optimizer can reason about normal looking loops better. 2. Split the iteration over a range into (A) iteration over the blocks, then (B) iteration within the block. This nested structure helps LLVM lower the inner loop to `memset`. 3. Do fewer things each iteration. Some of these loops were incrementing or changing 4-5 variables every loop (in addition to the construction). Previously most loops would increment the end pointer, the size, and decrement the count of remaining items to construct. Now we only increment a single pointer for most iterations. llvm-svn: 368547
* [clangd] Highlighting auto variables as the deduced type.Johan Vikstrom2019-08-122-16/+40
| | | | | | | | | | | | | | | | | | Summary: Done in VisitDeclaratorDecl as the AutoTypeLoc is not deduced. Scoped to only work for variables. auto function return values need to be handled in a special way (separate patch for that). auto's that are in lambdas ar enot highlighted as we don't highlight their underlying type (it's a RecordDecl, but the name is not an identifier so it returns in addToken). Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65996 llvm-svn: 368546
* [CrossTU] Fix problem with CrossTU AST load limit and progress messages.Balazs Keri2019-08-122-74/+59
| | | | | | | | | | | | | | | | | | | Summary: Number of loaded ASTs is to be incremented only if the AST was really loaded but not if it was returned from cache. At the same place the message about a loaded AST is displayed. Reviewers: martong, gamesh411 Reviewed By: martong Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66054 llvm-svn: 368545
* [X86] Add some reduction add test cases that show sub-optimal code on avx2 ↵Craig Topper2019-08-121-0/+225
| | | | | | | | | | | | | and later. For v4i8 and v8i8 when the reduction starts with a load we end up shifting the data in the scalar domain and copying to the vector domain a second time using a broadcast. We already copied it to the vector domain once. It's better to just shuffle it there. llvm-svn: 368544
* [X86] Support -march=tigerlakePengfei Wang2019-08-129-2/+173
| | | | | | | | | | | | Support -march=tigerlake for x86. Compare with Icelake Client, It include 4 more new features ,they are avx512vp2intersect, movdiri, movdir64b, shstk. Patch by Xiang Zhang (xiangzhangllvm) Differential Revision: https://reviews.llvm.org/D65840 llvm-svn: 368543
OpenPOWER on IntegriCloud