summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [RISCV] Implement MC layer support for the fence.tso instructionAlex Bradbury2018-06-083-0/+12
| | | | | | | | | | | The instruction makes use of a previously ignored field in the fence instruction. It is introduced in the version 2.3 draft of the RISC-V specification after much work by the Memory Model Task Group. As clarified here <https://github.com/riscv/riscv-isa-manual/issues/186>, the fence.tso assembler mnemonic does not have operands. llvm-svn: 334278
* DebugNamesDWARFIndex: Implement regex version of the GetFunctions methodPavel Labath2018-06-085-13/+61
| | | | | | | | | This also fixes a bug where SymbolFileDWARF was returning the same function multiple times - this can happen if both mangled and demangled names match the regex. Other lookup lookup functions had code to handle this case, but it was forgotten here. llvm-svn: 334277
* [X86][SSE] Consistently prefer lowering to PACKUS over PACKSSSimon Pilgrim2018-06-087-93/+93
| | | | | | | | | | We have some combines/lowerings that attempt to use PACKSS-then-PACKUS and others that use PACKUS-then-PACKSS. PACKUS is much easier to combine with if we know the upper bits are zero as ComputeKnownBits can easily see through BITCASTs etc. especially now that rL333995 and rL334007 have landed. It also effectively works at byte level which further simplifies shuffle combines. The only (minor) annoyances are that ComputeKnownBits can sometimes take longer as it doesn't fail as quickly as ComputeNumSignBits (but I'm not seeing any actual regressions in tests) and PACKUSDW only became available after SSE41 so we have more codegen diffs between targets. llvm-svn: 334276
* [TableGen] Make DAGInstruction own Pattern to avoid leaking it.Florian Hahn2018-06-082-11/+13
| | | | | | | | | | Reviewers: dsanders, craig.topper, stoklund, nhaehnle Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D47525 llvm-svn: 334275
* [clangd] Downrank symbols with reserved names (score *= 0.1)Sam McCall2018-06-083-5/+30
| | | | | | | | | | Reviewers: ilya-biryukov Subscribers: klimek, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47707 llvm-svn: 334274
* DebugNamesDWARFIndex: Implement GetFunctions methodPavel Labath2018-06-087-72/+121
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements the non-regex variant of GetFunctions. To share more code with the Apple implementation, I've extracted the common filtering code from that class into a utility function on the DWARFIndex base class. The new implementation also searching the accelerator table multiple times -- previously it could happen that the apple table would return the same die more than once if one specified multiple search flags in name_type_mask. This way, I separate table iteration from filtering, and so we can be sure each die is inserted at most once. Reviewers: clayborg, JDevlieghere Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D47881 llvm-svn: 334273
* [Xray] logging forgotten headerDavid Carlier2018-06-081-0/+1
| | | | | | | | | | | | pthread.h missing for pthread_key* functions. Reviewers: dberris Reviewed By: dberris Differential Revison: https://reviews.llvm.org/D47933 llvm-svn: 334272
* [LV] Fix PR36983. For a given recurrence, fix all phis in exit blockRoman Shirokiy2018-06-082-2/+25
| | | | | | | | | There could be more than one PHIs in exit block using same loop recurrence. Don't assume there is only one and fix each user. Differential Revision: https://reviews.llvm.org/D47788 llvm-svn: 334271
* [clang-tidy] Improve string type matcher for abseil-string-find-starts-with ↵Haojian Wu2018-06-082-3/+21
| | | | | | | | | | | | | | | | check. Summary: This patch improves the check to match the desugared "string" type (so that it can handle custom-implemented string classes), see the newly-added test. Reviewers: alexfh Subscribers: klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D47704 llvm-svn: 334270
* AMDGPU: Error on LDS global address in functionsMatt Arsenault2018-06-082-1/+18
| | | | | | | These won't work as expected now, so error on them to avoid wasting time debugging this in the future. llvm-svn: 334269
* [DAGCombine] Fix for PR37667Sam Parker2018-06-082-10/+21
| | | | | | | | | | While trying to propagate AND masks back to loads, we currently allow one non-load node to be included as a leaf in chain. This fix now limits that node to produce only a single data value. Differential Revision: https://reviews.llvm.org/D47878 llvm-svn: 334268
* [XRay][compiler-rt] Cleanup some internal XRay utilitiesDean Michael Berris2018-06-082-7/+7
| | | | | | | This change uses 'const' for the retryingWriteAll(...) API and removes unnecessary 'static' local variables in getting the temporary filename. llvm-svn: 334267
* [X86] Add builtins for shufps and shufpd to enable target feature and ↵Craig Topper2018-06-086-24/+50
| | | | | | immediate range checking. llvm-svn: 334266
* [X86] Add builtins for pshufd, pshuflw, and pshufhw to enable target feature ↵Craig Topper2018-06-0813-139/+105
| | | | | | and immediate range checking. llvm-svn: 334265
* [X86] Fix some typecasts in intrinsic headers that I messed up in r334261.Craig Topper2018-06-081-3/+3
| | | | | | This was caught by the Header tests, but not the CodeGen tests. llvm-svn: 334264
* [NFC] fix formattingHiroshi Inoue2018-06-081-1/+1
| | | | llvm-svn: 334263
* [XRay][compiler-rt] Remove reliance on C++ ABI featuresDean Michael Berris2018-06-083-115/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes http://llvm.org/PR32274. This change adds a test to ensure that we're able to link XRay modes and the runtime to binaries that don't need to depend on the C++ standard library or a C++ ABI library. In particular, we ensure that this will work with C programs compiled+linked with XRay. To make the test pass, we need to change a few things in the XRay runtime implementations to remove the reliance on C++ ABI features. In particular, we change the thread-safe function-local-static initialisation to use pthread_* instead of the C++ features that ensure non-trivial thread-local/function-local-static initialisation. Depends on D47696. Reviewers: dblaikie, jfb, kpw, eizan Reviewed By: kpw Subscribers: echristo, eizan, kpw, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46998 llvm-svn: 334262
* [X86] Add subvector insert and extract builtins to enable target feature ↵Craig Topper2018-06-0816-330/+243
| | | | | | | | checking and immediate range checking. Test changes are due to differences in how we generate undef elements now. We also changed the types used for extractf128_si256/insertf128_si256 to match the signature of the builtin that previously existed which this patch resurrects. This also matches gcc. llvm-svn: 334261
* PDB support of function-level linking and splitted functionsAaron Smith2018-06-086-17/+126
| | | | | | | | | | | | | | | | | | | Summary: The patch adds support of splitted functions (when MSVC is used with PGO) and function-level linking feature. SymbolFilePDB::ParseCompileUnitLineTable function relies on fact that ranges of compiled source files in the binary are continuous and don't intersect each other. The function creates LineSequence for each file and inserts it into LineTable, and implementation of last one relies on continuity of the sequence. But it's not always true when function-level linking enabled, e.g. in added input test file test-pdb-function-level-linking.exe there is xstring's std__basic_string_char_std__char_traits_char__std__allocator_char_____max_size (.00454820) between test-pdb-function-level-linking.cpp's foo (.00454770) and main (.004548F0). To fix the problem this patch renews the sequence on each address gap. Reviewers: asmith, zturner Reviewed By: asmith Subscribers: aleksandr.urakov, labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D47708 llvm-svn: 334260
* Added missing include to LoadedModuleInfoList.hRaphael Isemann2018-06-081-0/+1
| | | | | | | | Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D47923 llvm-svn: 334259
* [X86] Improve some shuffle decoding code to remove a conditional from a loop ↵Craig Topper2018-06-081-11/+9
| | | | | | | | and reduce the number of temporary variables. NFCI The NumControlBits variable was definitely sketchy. I think that only worked because the expected value was 1 or 2 and the number of lanes was 2 or 4. Had their been 8 lanes the number of bits should have been 3 not 4 as the previous code would have given. llvm-svn: 334258
* [AMDGPU] Simplify memory legalizer (add missing virtual descructor)Tony Tye2018-06-081-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D47504 llvm-svn: 334257
* [X86] Add builtins for vpermilps/pd instructions to enable target feature ↵Craig Topper2018-06-088-70/+64
| | | | | | checking. llvm-svn: 334256
* [HWASan] Disable allocator_returns_null.cc test on Android.Alex Shlyapnikov2018-06-081-0/+3
| | | | | | | Disable test added in D47798 on Android and investigate why "new" behaves differently there. llvm-svn: 334255
* Revert r334209 "[LSR] Check yet more intrinsic pointer operands"Reid Kleckner2018-06-082-54/+5
| | | | | | | This causes cast failures when compiling harfbuzz in Chromium. Reproducer on the way. llvm-svn: 334254
* [CodeGen] Always use MSVC personality for windows-msvc targetsShoaib Meenai2018-06-083-26/+28
| | | | | | | | | | | | | | | | | The windows-msvc target is meant to be ABI compatible with MSVC, including the exception handling. Ensure that a windows-msvc triple always equates to the MSVC personality being used. This mostly affects the GNUStep and ObjFW Obj-C runtimes. To the best of my knowledge, those are normally not used with windows-msvc triples. I believe WinObjC is based on GNUStep (or it at least uses libobjc2), but that also takes the approach of wrapping Obj-C exceptions in C++ exceptions, so the MSVC personality function is the right one to use there as well. Differential Revision: https://reviews.llvm.org/D47862 llvm-svn: 334253
* [clang-fuzzer] Made loop_proto more "vectorizable".Matt Morehouse2018-06-082-45/+13
| | | | | | | | | | | | | Edited loop_proto and its converter to make more "vectorizable" code according to kcc's comment in D47666 - Removed all while loops - Can only index into array with induction variable Patch By: emmettneyman Differential Revision: https://reviews.llvm.org/D47920 llvm-svn: 334252
* Reapply "[Parse] Use CapturedStmt for @finally on MSVC"Shoaib Meenai2018-06-0810-15/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies r334224 and adds explicit triples to some tests to fix them on Windows (where otherwise they would have run with the default windows-msvc triple, which I'm changing the behavior for). Original commit message: The body of a `@finally` needs to be executed on both exceptional and non-exceptional paths. On landingpad platforms, this is straightforward: the `@finally` body is emitted as a normal (non-exceptional) cleanup, and then a catch-all is emitted which branches to that cleanup (the cleanup has code to conditionally re-throw based on a flag which is set by the catch-all). Unfortunately, we can't use the same approach for MSVC exceptions, where the catch-all will be emitted as a catchpad. We can't just branch to the cleanup from within the catchpad, since we can only exit it via a catchret, at which point the exception is destroyed and we can't rethrow. We could potentially emit the finally body inside the catchpad and have the normal cleanup path somehow branch into it, but that would require some new IR construct that could branch into a catchpad. Instead, after discussing it with Reid Kleckner, we decided that frontend outlining was the best approach, similar to how SEH `__finally` works today. We decided to use CapturedStmt (which was also suggested by Reid) rather than CaptureFinder (which is what `__finally` uses) since the latter doesn't handle a lot of cases we care about, e.g. self accesses, property accesses, block captures, etc. Extending CaptureFinder to handle those additional cases proved unwieldy, whereas CapturedStmt already took care of all of those. In theory `__finally` could also be moved over to CapturedStmt, which would remove some existing limitations (e.g. the inability to capture this), although CaptureFinder would still be needed for SEH filters. The one case supported by `@finally` but not CapturedStmt (or CaptureFinder for that matter) is arbitrary control flow out of the `@finally`, e.g. having a return statement inside a `@finally`. We can add that support as a follow-up, but in practice we've found it to be used very rarely anyway. Differential Revision: https://reviews.llvm.org/D47564 llvm-svn: 334251
* Expand comments.Rui Ueyama2018-06-082-11/+42
| | | | llvm-svn: 334250
* [X86] Add builtins for blend with immediate control to enforce target ↵Craig Topper2018-06-088-71/+55
| | | | | | feature requirements and check immediate range. llvm-svn: 334249
* [HWASan] Report proper error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-06-0714-35/+315
| | | | | | | | | | | | | | | | Summary: Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, not stack, no details, not too helpful nor informative. To improve the situation, detailed and structured errors were defined and reported under the appropriate conditions. Reviewers: eugenis Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D47798 llvm-svn: 334248
* NFC Fix a comment in ValueTypes.tdGabor Buella2018-06-071-2/+2
| | | | llvm-svn: 334247
* Expose a single global file open function.Zachary Turner2018-06-073-100/+115
| | | | | | | | | This one allows much more flexibility than the standard openFileForRead / openFileForWrite functions. Since there is now just one "real" function that does the work, all other implementations simply delegate to this one. llvm-svn: 334246
* [lldb-mi] Add overloaded method for setting an error.Alexander Polyakov2018-06-072-0/+20
| | | | | | | | | | | | Reviewers: aprantl, clayborg Reviewed By: clayborg Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D47914 llvm-svn: 334245
* [X86] Add builtins for shuff32x4/shuff64x2/shufi32x4/shuff64x2 to enable ↵Craig Topper2018-06-077-82/+67
| | | | | | target feature checking and immediate range checking. llvm-svn: 334244
* [Frontend] Disallow non-MSVC exception models for windows-msvc targetsShoaib Meenai2018-06-078-71/+43
| | | | | | | | | | | | | | The windows-msvc target is used for MSVC ABI compatibility, including the exceptions model. It doesn't make sense to pair a windows-msvc target with a non-MSVC exception model. This would previously cause an assertion failure; explicitly error out for it in the frontend instead. This also allows us to reduce the matrix of target/exception models a bit (see the modified tests), and we can possibly simplify some of the personality code in a follow-up. Differential Revision: https://reviews.llvm.org/D47853 llvm-svn: 334243
* propagate fast math flags via IR on fma and sub expressionsMichael Berg2018-06-075-56/+68
| | | | | | | | | | | | | | Summary: This change uses fmf subflags to guard fma optimizations as well as unsafe. These changes originated from D46483 and have been simplified via getNode. Reviewers: spatel, arsenm, hfinkel, javed.absar Reviewed By: spatel Subscribers: nemanjai, wdng Differential Revision: https://reviews.llvm.org/D47388 llvm-svn: 334242
* [AMDGPU] Simplify memory legalizerTony Tye2018-06-077-373/+2923
| | | | | | | | | | - Make code easier to maintain. - Avoid generating waitcnts for VMEM if the address sppace does not involve VMEM. - Add support to generate waitcnts for LDS and GDS memory. Differential Revision: https://reviews.llvm.org/D47504 llvm-svn: 334241
* Revert "[Parse] Use CapturedStmt for @finally on MSVC"Shoaib Meenai2018-06-075-32/+2
| | | | | | | | | | This reverts commit r334224. This is causing buildbot failures on Windows, presumably because some tests don't specify a triple. I'll test this on Windows locally and recommit with the tests fixed. llvm-svn: 334240
* [MS] Re-add support for the ARM interlocked bittest intrinscsReid Kleckner2018-06-077-83/+293
| | | | | | | | | | | | | | | Adds support for these intrinsics, which are ARM and ARM64 only: _interlockedbittestandreset_acq _interlockedbittestandreset_rel _interlockedbittestandreset_nf _interlockedbittestandset_acq _interlockedbittestandset_rel _interlockedbittestandset_nf Refactor the bittest intrinsic handling to decompose each intrinsic into its action, its width, and its atomicity. llvm-svn: 334239
* [checks/property-decls] Fix comment in ↵Ben Hamilton2018-06-071-1/+1
| | | | | | | | | | | | | | | | | | clang-tidy/objc/PropertyDeclarationCheck.cpp ✍️ Summary: The comment incorrectly claims that the listed acronyms are all extracted from the linked Apple documentation. Reviewers: Wizard, benhamilton Reviewed By: Wizard, benhamilton Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46922 Contributed by @stephanemoore. llvm-svn: 334238
* [X86] Add builtins for VALIGNQ/VALIGND to enable proper target feature checking.Craig Topper2018-06-075-54/+44
| | | | | | | | We still emit shufflevector instructions we just do it from CGBuiltin.cpp now. This ensures the intrinsics that use this are only available on CPUs that support the feature. I also added range checking to the immediate, but only checked it is 8 bits or smaller. We should maybe be stricter since we never use all 8 bits, but gcc doesn't seem to do that. llvm-svn: 334237
* [NFC][InstSimplify] Add tests for add nuw %x, -1 -> -1 fold.Roman Lebedev2018-06-071-0/+145
| | | | | | | | | | | | | | | | %ret = add nuw i8 %x, C From langref: nuw and nsw stand for “No Unsigned Wrap” and “No Signed Wrap”, respectively. If the nuw and/or nsw keywords are present, the result value of the add is a poison value if unsigned and/or signed overflow, respectively, occurs. So if C is -1, %x can only be 0, and the result is always -1. https://rise4fun.com/Alive/sldC Was mentioned in D47428 review. llvm-svn: 334236
* [NFC][InstSimplify] One more negative test for shl nuw C, %x -> C fold.Roman Lebedev2018-06-071-1/+10
| | | | | | Follow-up for rL334200, rL334206. llvm-svn: 334235
* [libFuzzer] When printing NEW_FUNC, use 1-base indexing.Kostya Serebryany2018-06-071-1/+1
| | | | | | | | | | | | | | Summary: Otherwise we print things like [0/1] which is visually confusing. Reviewers: kcc Reviewed By: kcc Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D47837 llvm-svn: 334234
* Back out of GPU Codegen if NVPTX is not availablePhilip Pfaffe2018-06-071-5/+8
| | | | | | | | | | | | | | | | | Summary: When enabling GPU codegen in polly, CMake will fail if NVPTX is not a target supported by the LLVM polly is being built against. In that case, GPU codegen should be switched off. Reviewers: Meinersbur, grosser, bollu Reviewed By: Meinersbur Subscribers: mgorny, bollu, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D47888 llvm-svn: 334233
* [Support] Link libzircon.so when building LLVM for FuchsiaPetr Hosek2018-06-071-0/+3
| | | | | | | | This is necessary for zx_* symbols. Differential Revision: https://reviews.llvm.org/D47848 llvm-svn: 334232
* Try to fix build.Zachary Turner2018-06-071-1/+1
| | | | | | | | I don't know how to build this code, but based on the failing buildbot error message it looks like this change should get the buildbot up and running again. llvm-svn: 334231
* r600/fmin: Flush denormals before calling builtin.Jan Vesely2018-06-072-0/+31
| | | | | | | | | Same reason as amdgcn. Fixes fmin, minmag CTS on turks. Reviewer: Tom Stellard <tstellar@redhat.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 334228
* r600/fmax: Flush denormals before calling builtin.Jan Vesely2018-06-072-0/+30
| | | | | | | | | Same reason as amdgcn. Fixes fmax, maxmag CTS on turks. Reviewer: Tom Stellard <tstellar@redhat.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 334227
OpenPOWER on IntegriCloud