summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add non-SSE wrapper for __kmp_{load,store}_mxcsrDimitry Andric2019-05-061-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: To be able to successfully build OpenMP on FreeBSD/i386, which still uses i486 as its default processor, I had to provide wrappers for the `__kmp_load_mxcsr` and `__kmp_store_mxcsr` functions. If the compiler signals that SSE is not available, loading and storing mxcsr does not make sense anway, so in that case the inline functions are empty. This gives the minimum amount of code churn. See also https://svnweb.freebsd.org/changeset/base/345283 Reviewers: emaste, jlpeyton, Hahnfeld Reviewed By: jlpeyton Subscribers: hfinkel, krytarowski, jdoerfert, openmp-commits, llvm-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D60916 llvm-svn: 360062
* [OPENMP]Fix PR41768: check DSA for globals with `default(none)` clauses.Alexey Bataev2019-05-0639-66/+78
| | | | | | | | If the `default(none)` was specified for the construct, we might miss diagnostic for the globals without explicitly specified data-sharing attributes. Patch fixes this problem. llvm-svn: 360061
* Add libc++ to link XRay test cases if libc++ is used to build CLANGXing Xue2019-05-063-1/+12
| | | | | | | | | | | | | | Summary: When libc++ is used to build CLANG, its XRay libraries libclang_rt.xray-*.a have dependencies on libc++. Therefore, libc++ is needed to link and run XRay test cases. For Linux -rpath is also needed to specify where to load libc++. This change sets macro LLVM_LIBCXX_USED to 1 if libc++ is actually used in the build. XRay tests then check the flag and add -L<llvm_shlib_dir> -lc++ and -Wl,-rpath=<llvm_shlib_dir> if needed. Reviewers: hubert.reinterpretcast, amyk, dberris, jasonliu, sfertile, EricWF Subscribers: dberris, mgorny, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61016 llvm-svn: 360060
* [InstCombine] reduce code duplication; NFCSanjay Patel2019-05-061-7/+7
| | | | llvm-svn: 360059
* [InstCombine] add tests for fneg+sel; NFCSanjay Patel2019-05-061-0/+84
| | | | llvm-svn: 360058
* gn build: More TODO tweakingNico Weber2019-05-061-1/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D61468 llvm-svn: 360057
* gn build: Update TODO now that libcxx libcxxabi libunwind clang-tools-extra ↵Nico Weber2019-05-061-2/+1
| | | | | | | | are done Differential Revision: https://reviews.llvm.org/D61468 llvm-svn: 360056
* [ConstantRange] Add srem() supportNikita Popov2019-05-063-8/+140
| | | | | | | | | | | | | | | Add support for srem() to ConstantRange so we can use it in LVI. For srem the sign of the result matches the sign of the LHS. For the RHS only the absolute value is important. Apart from that the logic is like urem. Just like for urem this is only an approximate implementation. The tests check a few specific cases and run an exhaustive test for conservative correctness (but not exactness). Differential Revision: https://reviews.llvm.org/D61207 llvm-svn: 360055
* [SDAG][AArch64] Boolean and/or reduce to umax/min reduce (PR41635)Nikita Popov2019-05-062-118/+32
| | | | | | | | | | | This addresses one half of https://bugs.llvm.org/show_bug.cgi?id=41635 by combining a VECREDUCE_AND/OR into VECREDUCE_UMIN/UMAX (if latter is legal but former is not) for zero-or-all-ones boolean reductions (which are detected based on sign bits). Differential Revision: https://reviews.llvm.org/D61398 llvm-svn: 360054
* Add FNeg support to InstructionSimplifyCameron McInally2019-05-064-11/+87
| | | | | | Differential Revision: https://reviews.llvm.org/D61573 llvm-svn: 360053
* [InstCombine] regenerate test checks; NFCSanjay Patel2019-05-062-24/+36
| | | | llvm-svn: 360052
* [InstCombine] reduce code duplication; NFCISanjay Patel2019-05-061-22/+19
| | | | llvm-svn: 360051
* Modernize repmovsb implementation of x86 memcpy and allow runtime sizes.Guillaume Chatelet2019-05-061-97/+118
| | | | | | | | | | | | | | | | | | | | Summary: This is a prerequisite to RFC http://lists.llvm.org/pipermail/llvm-dev/2019-April/131973.html Reviewers: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61593 Fix typo. Turn this patch into an NFC. Addressing comments llvm-svn: 360050
* gn build: Merge r360018Nico Weber2019-05-061-0/+2
| | | | llvm-svn: 360049
* [CodeComplete] Update python tests after r360042Ilya Biryukov2019-05-061-2/+2
| | | | llvm-svn: 360048
* [X86] Fix uninitialized members in constructor warnings. NFCI.Simon Pilgrim2019-05-062-3/+3
| | | | | | Initialize all member variables in X86ATTInstPrinter and X86DAGToDAGISel constructors to fix cppcheck warning. llvm-svn: 360047
* [AMDGPU][test] Define local symbols used in amdgpu-relocs.sFangrui Song2019-05-061-7/+19
| | | | | | Differential Revision: https://reviews.llvm.org/D61594 llvm-svn: 360046
* Fix CMake Invalid Escape SequenceAlexandre Ganea2019-05-061-1/+1
| | | | | | | | Patch by xoviat Differential Revision: https://reviews.llvm.org/D60658 llvm-svn: 360045
* Fix compilation warnings when compiling with GCC 7.3Alexandre Ganea2019-05-065-10/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D61046 llvm-svn: 360044
* [PowerPC] Fix erroneous condition for converting uint-to-fp vector conversionNemanja Ivanovic2019-05-062-3/+136
| | | | | | | | | | | | | | A condition for exiting the legalization of v4i32 conversion to v2f64 through extract/convert/build erroneously checks for the extract having type i32. This is not adequate as smaller extracts are actually legalized to i32 as well. Furthermore, an early exit is missing which means that we only check that both extracts are from the same vector if that check fails. As a result, both cases in the included test case fail - the first gets a select error and the second generates incorrect code. The culprit commit is r274535. llvm-svn: 360043
* [CodeComplete] Add a trailing semicolons to some pattern completionsIlya Biryukov2019-05-064-19/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Where semicolon is required in any case. Here's a list of completions that now have a semicolon: - namespace <name> = <target>; - using namespace <name>; - using <qualifier>::<name>; - continue; - break; - goto <label>; - return; - return <expression>; Reviewers: gribozavr Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61589 llvm-svn: 360042
* [lldb] [lit] Use more readable consts and arrays in register read testsMichal Gorny2019-05-0612-490/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the constants used for r8/mm/xmm/ymm/zmm tests with something more readable to ease debugging in case of failures (0x00 0x01 ...). While at it, put the constants in array and copy them from memory to simplify inline asm. The original constants grew out of necessity. The xmm constants were 'weird' because they were intended to be different from mm constants (as that was necessary to catch NetBSD implementation bug). The ymm constants were made even weirded to not even partially collide with other xmm registers (not saying it made sense, just how it was done). Then, zmm constants were once again designed to avoid accidental collisions with xmm and ymm constants, and at the same the 16 extra registers required even more shuffling. The new constants are meant to be more user-readable, so that a mistake could be easily spotted. All of xmm, ymm and zmm tests use a sequence of {0x00 0x01 0x02 ...}, shifted by 1 for every register. This should provide enough uniquity, and space for future increase in number of registers. Since mm and r8..r15 are printed as uint64_t rather than byte-by-byte, they use 0x000102... As a result, on x86 endianness takes care of making mm different than xmm. The use of arrays is something I had to learn for zmm write tests. It avoids having to specify all the input values separately, and makes GCC happy about zmm-read test (it was rejected previously because of hitting a limit of 30 constraints). llvm-svn: 360041
* [lld] A better version of the fix in r359942.Alexander Kornienko2019-05-061-1/+1
| | | | | | Thanks to George Rimar for the suggestion. llvm-svn: 360040
* [clangd] Expose whether no-compile completion was used.Sam McCall2019-05-063-0/+7
| | | | | | | | | | | | | | Summary: Embedding clients want to experiment with showing such results in e.g. a different color. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61588 llvm-svn: 360039
* Merge GetCompileUnitAtOffset + GetCompileUnitContainingDIEOffsetJan Kratochvil2019-05-062-49/+27
| | | | | | | | | | | | | | | | These two methods are very similar and various refactorizations need to modify both similar ways. One could also just remove GetCompileUnitAtOffset and make GetCompileUnitContainingDIEOffset to also accept offset of the CU itself (currently it accepts only DIE offsets after the CU header). But that would be less safe regarding some internal sanity checking. Further code refactorization has been suggested by Pavel Labath. Differential Revision: https://reviews.llvm.org/D61498 llvm-svn: 360038
* X86DAGToDAGISel::tryVPTESTM - fix uninitialized variable warning. NFCI.Simon Pilgrim2019-05-061-1/+1
| | | | | | findBroadcastedOp should always initialize the value if it returns true but static-analyzer isn't great at recognising this. llvm-svn: 360037
* [test] Remove redundant bracket in rL360035Fangrui Song2019-05-061-2/+2
| | | | llvm-svn: 360036
* Try fix Windows bot after rL360015Fangrui Song2019-05-061-3/+3
| | | | llvm-svn: 360035
* Try fix Windows bot after rL360015Fangrui Song2019-05-061-1/+1
| | | | | | http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/25599/steps/test/logs/stdio llvm-svn: 360034
* [llvm-c-test] Make include-all.c do what its name says it doesAnders Waldenborg2019-05-061-1/+16
| | | | | | | | | | | The purpose of this file is to make sure that all includes in llvm-c works when included from a C source file (i.e no C++isms sneaked in). To do this it must actually include all the include files. Reviewed By: whitequark Differential Revision: https://reviews.llvm.org/D61567 llvm-svn: 360033
* [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse ↵Adam Balogh2019-05-062-2/+84
| | | | | | | | | | | | | | | in pointer arithmetic Some programmers tend to forget that subtracting two pointers results in the difference between them in number of elements of the pointee type instead of bytes. This leads to codes such as `size_t size = (p - q) / sizeof(int)` where `p` and `q` are of type `int*`. Or similarily, `if (p - q < buffer_size * sizeof(int)) { ... }`. This patch extends `bugprone-sizeof-expression` to detect such cases. Differential Revision: https://reviews.llvm.org/D61422 llvm-svn: 360032
* [LoadStoreVectorizer] vectorizeStoreChain - ensure we find a store type.Simon Pilgrim2019-05-061-1/+2
| | | | | | | | Properly initialize store type to null then ensure we find a real store type in the chain. Fixes scan-build null dereference warning and makes the code clearer. llvm-svn: 360031
* [clangd] Boost code completion results that were named in the last few lines.Sam McCall2019-05-0610-6/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The hope is this will catch a few patterns with repetition: SomeClass* S = ^SomeClass::Create() int getFrobnicator() { return ^frobnicator_; } // discard the factory, it's no longer valid. ^MyFactory.reset(); Without triggering antipatterns too often: return Point(x.first, x.^second); I'm going to gather some data on whether this turns out to be a win overall. Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61537 llvm-svn: 360030
* [CodeGen] Move X86 tests under the X86 directoryFangrui Song2019-05-062-0/+0
| | | | llvm-svn: 360029
* [X86] X86InstrInfo::findThreeSrcCommutedOpIndices - fix unread variable warning.Simon Pilgrim2019-05-061-1/+2
| | | | | | scan-build was reporting that CommutableOpIdx1 never used its original initialized value - move it down to where its first used to make the real initialization more obvious (and matches the comment that's there). llvm-svn: 360028
* [X86] lowerVectorShuffle - use any_of to detect out of bounds shuffle ↵Simon Pilgrim2019-05-061-9/+8
| | | | | | | | indices. NFCI. Fixes cppcheck local shadow warning as well. llvm-svn: 360027
* [clangd] Qualify uses of ::testing everywhere. NFCIlya Biryukov2019-05-0615-113/+110
| | | | | | | | | Add an initial '::' qualifier to all usages of 'testing' namespace that did not have one. The goal is to make our code style in tests more consistent. llvm-svn: 360026
* [Analysis] Remove duplicated std::move from LocRange constructorSimon Pilgrim2019-05-061-1/+1
| | | | | | scan-build was reporting that we were referencing a moved variable - in fact we were moving it twice..... llvm-svn: 360025
* Revert r359949 "[clang] adding explicit(bool) from c++2a"Hans Wennborg2019-05-0646-1649/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused Clang to start erroring on the following: struct S {   template <typename = int> explicit S(); }; struct T : S {}; struct U : T {   U(); }; U::U() {} $ clang -c /tmp/x.cc /tmp/x.cc:10:4: error: call to implicitly-deleted default constructor of 'T' U::U() {}    ^ /tmp/x.cc:5:12: note: default constructor of 'T' is implicitly deleted because base class 'S' has no default constructor struct T : S {};            ^ 1 error generated. See discussion on the cfe-commits email thread. This also reverts the follow-ups r359966 and r359968. > this patch adds support for the explicit bool specifier. > > Changes: > - The parsing for the explicit(bool) specifier was added in ParseDecl.cpp. > - The storage of the explicit specifier was changed. the explicit specifier was stored as a boolean value in the FunctionDeclBitfields and in the DeclSpec class. now it is stored as a PointerIntPair<Expr*, 2> with a flag and a potential expression in CXXConstructorDecl, CXXDeductionGuideDecl, CXXConversionDecl and in the DeclSpec class. > - Following the AST change, Serialization, ASTMatchers, ASTComparator and ASTPrinter were adapted. > - Template instantiation was adapted to instantiate the potential expressions of the explicit(bool) specifier When instantiating their associated declaration. > - The Add*Candidate functions were adapted, they now take a Boolean indicating if the context allowing explicit constructor or conversion function and this boolean is used to remove invalid overloads that required template instantiation to be detected. > - Test for Semantic and Serialization were added. > > This patch is not yet complete. I still need to check that interaction with CTAD and deduction guides is correct. and add more tests for AST operations. But I wanted first feedback. > Perhaps this patch should be spited in smaller patches, but making each patch testable as a standalone may be tricky. > > Patch by Tyker > > Differential Revision: https://reviews.llvm.org/D60934 llvm-svn: 360024
* [NFC] Update memcpy testsGuillaume Chatelet2019-05-0611-251/+924
| | | | | | | | | | | | | | | | Summary: Runs utils/update_llc_test_checks.py on a few memcpy files Reviewers: courbet Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61507 Remove cfi noise by adding nounwind llvm-svn: 360023
* [X86] Move files to correct directories after D60552Fangrui Song2019-05-0622-0/+0
| | | | llvm-svn: 360022
* [SimplifyLibCalls] Simplify bcmp too.Clement Courbet2019-05-063-1/+165
| | | | | | | | | | | | | | Summary: Fixes PR40699. Reviewers: gchatelet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61585 llvm-svn: 360021
* [clangd] Always call getFormatStyleForFile().Sam McCall2019-05-062-8/+9
| | | | | | | | | | This means "format" will no longer return an error if the -fallback-style flag is invalid, it will log and use LLVM style. This doesn't really matter. Also document the dependence on global variables. (This patch is a compromise - it's probably not worth actually avoiding the globals). llvm-svn: 360020
* [NFC] This is a test for the commit access.Pengfei Wang2019-05-061-3/+3
| | | | | | | | | | | | | | Summary: Signed-off-by: Pengfei Wang <pengfei.wang@intel.com> Reviewers: LuoYuanke Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61580 llvm-svn: 360019
* Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper ↵Luo, Yuanke2019-05-0616-2/+935
| | | | | | | | | | | | | | | | | | | | | | | Lake Summary: 1. Enable infrastructure of AVX512_BF16, which is supported for BFLOAT16 in Cooper Lake; 2. Enable intrinsics for VCVTNE2PS2BF16, VCVTNEPS2BF16 and DPBF16PS instructions, which are Vector Neural Network Instructions supporting BFLOAT16 inputs and conversion instructions from IEEE single precision. For more details about BF16 intrinsic, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference Patch by LiuTianle Reviewers: craig.topper, smaslov, LuoYuanke, wxiao3, annita.zhang, spatel, RKSimon Reviewed By: craig.topper Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60552 llvm-svn: 360018
* Enable AVX512_BF16 instructions, which are supported for BFLOAT16 in Cooper LakeLuo, Yuanke2019-05-0628-0/+2784
| | | | | | | | | | | | | | | | | | | | | | | | Summary: 1. Enable infrastructure of AVX512_BF16, which is supported for BFLOAT16 in Cooper Lake; 2. Enable VCVTNE2PS2BF16, VCVTNEPS2BF16 and DPBF16PS instructions, which are Vector Neural Network Instructions supporting BFLOAT16 inputs and conversion instructions from IEEE single precision. VCVTNE2PS2BF16: Convert Two Packed Single Data to One Packed BF16 Data. VCVTNEPS2BF16: Convert Packed Single Data to Packed BF16 Data. VDPBF16PS: Dot Product of BF16 Pairs Accumulated into Packed Single Precision. For more details about BF16 isa, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference Author: LiuTianle Reviewers: craig.topper, smaslov, LuoYuanke, wxiao3, annita.zhang, RKSimon, spatel Reviewed By: craig.topper Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60550 llvm-svn: 360017
* [clangd] Support -fallback-style, similar to clang-format.Sam McCall2019-05-061-0/+9
| | | | | | | | | | | | Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61519 llvm-svn: 360016
* DWARF v5: fix directory index in the line tableFangrui Song2019-05-062-12/+78
| | | | | | | | | | | | | | Summary: Prior to DWARF v5, a directory index of 0 represents DW_AT_comp_dir. In DWARF v5, the index starts with 0 and Entry.DirIdx is the index into Prologue.IncludeDirectories. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D61253 llvm-svn: 360015
* [DWARF] Reimplement/simplify DWARFUnit::GetIDPavel Labath2019-05-068-41/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The implementation of GetID used a relatively complicated algorithm, which returned some kind of an offset of the unit in some file (depending on the debug info flavour). The only thing this ID was used for was to enable subseqent retrieval of the unit from the SymbolFile. This can be made simpler if we just make the "ID" of the unit an index into the list of the units belonging to the symbol file. We already support indexed access to the units, so each unit already has a well "index" -- this just makes it accessible from within the unit. To make the distincion between "id" and "offset" clearer (and help catch any misuses), I also rename DWARFDebugInfo::GetCompileUnit (which accesses by offset) into DWARFDebugInfo::GetCompileUnitAtOffset. On its own, this only brings a minor simplification, but it enables further simplifications in the DIERef class (coming in a follow-up patch). Reviewers: JDevlieghere, clayborg, aprantl Subscribers: arphaman, jdoerfert, lldb-commits, tberghammer, jankratochvil Differential Revision: https://reviews.llvm.org/D61481 llvm-svn: 360014
* [DebugInfo] GlobalOpt DW_OP_deref_size instead of DW_OP_deref.Markus Lavin2019-05-062-3/+7
| | | | | | | | | | Optimization pass lib/Transforms/IPO/GlobalOpt.cpp needs to insert DW_OP_deref_size instead of DW_OP_deref to be compatible with big-endian targets for same reasons as in D59687. Differential Revision: https://reviews.llvm.org/D60611 llvm-svn: 360013
OpenPOWER on IntegriCloud