summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove libc++ checks and workarounds for unsupported old versions of GCC (<4.9).Richard Smith2019-04-253-68/+39
| | | | | | Differential Revision: https://reviews.llvm.org/D61107 llvm-svn: 359232
* [GlobalISel][AArch64] Make G_EXTRACT_VECTOR_ELT legal for v8s16sJessica Paquette2019-04-252-2/+25
| | | | | | | | This case was missing before, so we couldn't legalize it. Add it to AArch64LegalizerInfo.cpp and update select-extract-vector-elt.mir. llvm-svn: 359231
* [analyzer][UninitializedObjectChecker] PR41590: Regard _Atomic types as ↵Kristof Umann2019-04-252-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | primitive https://bugs.llvm.org/show_bug.cgi?id=41590 For the following code snippet, UninitializedObjectChecker crashed: struct MyAtomicInt { _Atomic(int) x; MyAtomicInt() {} }; void entry() { MyAtomicInt b; } The problem was that _Atomic types were not regular records, unions, dereferencable or primitive, making the checker hit the llvm_unreachable at lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:347. The solution is to regard these types as primitive as well. The test case shows that with this addition, not only are we able to get rid of the crash, but we can identify x as uninitialized. Differential Revision: https://reviews.llvm.org/D61106 llvm-svn: 359230
* Fix buildbot failures after r359159.Richard Smith2019-04-251-1/+1
| | | | | | | | | | | | | std::mutex was not actually is_nothrow_default_constructible in C++98/C++03, because the variable declaration std::mutex M; ... could throw an exception from the mutex destructor. Fix it by marking the destructor as non-throwing. This has no effect in C++11 onwards, because destructors are non-throwing by default in those language modes. llvm-svn: 359229
* [lldb] [lit] Use constexpr and better constraints in Register testsMichal Gorny2019-04-252-37/+37
| | | | | | | | | | | | Use constexpr to explicitly indicate that we're dealing with integer constants, and provoke clang to assign them straight to registers whenever possible. Adjust input constraints in %mmN tests to "rm" as using integer constants is apparently disallowed there. Also use "i" for %rN tests, as we don't want clang to accidentally clobber those general purpose registers while assigning to them (however unlikely that is). llvm-svn: 359228
* Set _LIBCPP_DLL_VIS on _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS in MinGW modeMartin Storsjo2019-04-251-2/+7
| | | | | | | | | | Contrary to MSVC, MinGW compilers wants the dllexport attribute on the declaration of an explicit template instantiation, not on the definition. Differential Revision: https://reviews.llvm.org/D61123 llvm-svn: 359227
* [ObjC][ARC] Let ARC optimizer bail out if the number of pointer statesAkira Hatanaka2019-04-252-2/+68
| | | | | | | | | | | | | | | | | | | | it keeps track of becomes too large ARC optimizer does a top-down and a bottom-up traversal of the whole function to pair up retain and release instructions and remove them. This can be expensive if the number of instructions in the function and pointer states it tracks are large since it has to look at each pointer state and determine whether the instruction being visited can potentially use the pointer. This patch adds a command line option that sets a limit to the number of pointers it tracks. rdar://problem/49477063 Differential Revision: https://reviews.llvm.org/D61100 llvm-svn: 359226
* [AMDGPU] gfx1010 VOP1 instructionsStanislav Mekhanoshin2019-04-256-102/+306
| | | | | | Differential Revision: https://reviews.llvm.org/D61099 llvm-svn: 359225
* [AMDGPU] gfx1010 utility functionsStanislav Mekhanoshin2019-04-254-29/+90
| | | | | | Differential Revision: https://reviews.llvm.org/D61094 llvm-svn: 359224
* [libFuzzer] Require linux for libcxx.testMatt Morehouse2019-04-251-0/+1
| | | | llvm-svn: 359223
* [GlobalISel][AArch64] Add generic legalization rule for extendsJessica Paquette2019-04-256-9/+345
| | | | | | | | | | | | | This adds a legalization rule for G_ZEXT, G_ANYEXT, and G_SEXT which allows extends whenever the types will fit in registers (or the source is an s1). Update tests. Add GISel checks throughout all of arm64-vabs.ll, where we now select a good portion of the code. Add GISel checks to arm64-subvector-extend.ll, which has a good number of vector extends in it. Differential Revision: https://reviews.llvm.org/D60889 llvm-svn: 359222
* [lldb] [lit] Un-XFAIL Register/x86-64-read.test for DarwinMichal Gorny2019-04-251-1/+0
| | | | llvm-svn: 359221
* [libc++][test] Fix noexcept assertions in variant's get testsCasey Carter2019-04-253-6/+20
| | | | | | | | | | All constant expressions are non-potentially-throwing in C++14, but that is *not* the case in C++17. Change these tests of the `variant`-flavored overloads of `std::get` to expect the correct behavior when the compiler is not GCC or is GCC 9+. Credit to Jonathan Wakely for providing an improved version of my initial change that validates the incorrect behavior on GCC < 9 as well as validating the correct behavior on other compilers. Differential Revision: https://reviews.llvm.org/D61033 llvm-svn: 359220
* [SelectionDAG][X86] Use stack load/store in PromoteIntRes_BITCAST when the ↵Craig Topper2019-04-253-1089/+1006
| | | | | | | | | | | | | | | | | | input needs to be be split and the output type is a vector. We had special case handling here, but it uses a scalar any_extend for the promotion then bitcasts to the final type. This won't split up the input data into multiple promoted elements like we need. This patch falls back to doing the conversion through memory. Fixes PR41594 which I believe was reflected in the bitcast-vector-bool.ll changes. The changes to vector-half-conversions.ll are fixing a previously unknown miscompile from this issue. Differential Revision: https://reviews.llvm.org/D61114 llvm-svn: 359219
* [compiler-rt] Build custom libc++abi without exceptions.Matt Morehouse2019-04-252-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Since neither compiler-rt nor the libc++ we build use exceptions, we don't need libc++abi to have them either. This resolves an issue where libFuzzer's private libc++ contains implementations for __cxa_throw and friends, causing fuzz targets built with their own C++ library to segfault during exception unwinding. See https://github.com/google/oss-fuzz/issues/2328. Reviewers: phosek, EricWF, kcc Reviewed By: phosek Subscribers: kcc, dberris, mgorny, christof, llvm-commits, metzman Tags: #llvm Differential Revision: https://reviews.llvm.org/D61053 llvm-svn: 359218
* DebugInfo: Fix bitrotted test caseDavid Blaikie2019-04-251-8/+7
| | | | | | | This test was updated with some CHECK suffix variants, but dropped checking for the unsuffixed 'CHECK' llvm-svn: 359217
* creduce-clang-crash: add -F flag to grep to avoid interpreting string as regexAmy Huang2019-04-251-1/+1
| | | | llvm-svn: 359216
* [PGO] Enable InstrProf lowering for Clang PGO instrumentation in the new ↵Rong Xu2019-04-253-12/+47
| | | | | | | | | | | | | | | pass manager Currently InstrProf lowering is not enabled for Clang PGO instrumentation in the new pass manager. The following command "-fprofile-instr-generate -fexperimental-new-pass-manager ..." is broken. This CL enables InstrProf lowering pass for Clang PGO instrumentation in the new pass manager. Differential Revision: https://reviews.llvm.org/D61138 llvm-svn: 359215
* [clangd] Optimize "don't include me" check.Sam McCall2019-04-252-7/+34
| | | | | | | | | | | | | | | | Summary: llvm::Regex is really slow, and regex evaluation during preamble indexing was showing up as 25% on a profile of clangd in a codebase with large preambles. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61120 llvm-svn: 359214
* [NFC][Sanitizer] Extract GetFuncAddr from GetRealFunctionAddressJulian Lettner2019-04-253-9/+20
| | | | | | | | | | | | | | Summary: Hopefully, this will enable cleanup/removal of GetRealFunctionAddress in follow-up commits. Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61110 llvm-svn: 359213
* Fix bug 37903:MS ABI: handle inline static data member and inline variable ↵Jennifer Yu2019-04-253-2/+99
| | | | | | as template static data member llvm-svn: 359212
* Implement 'lerp'; which is the last bit of P0811. Mark that paper as complete.Marshall Clow2019-04-253-1/+103
| | | | llvm-svn: 359211
* [lldb] [lit] Add tests for reading new x86_64 registersMichal Gorny2019-04-252-0/+103
| | | | | | | | | Add tests covering read operations for the general-purpose and XMM registers added in x86_64 (r8-r15 and xmm8-xmm15). Differential Revision: https://reviews.llvm.org/D61072 llvm-svn: 359210
* [lldb] [lit] Remove unnecessary array use in XMM reading testMichal Gorny2019-04-251-8/+8
| | | | | | | | | | Remove the use of 2-element array for XMM data. It is an accidental leftover from previous implementation attempt, and it is unnecessary with xmm_t. Differential Revision: https://reviews.llvm.org/D61085 llvm-svn: 359208
* [WebAssembly] Always take into account added when applying runtime relocationsSam Clegg2019-04-253-29/+42
| | | | | | | | | | | The code we generate for applying data relocations at runtime omitted the symbols with GOT entries. Also refactor the code to reduce duplication. Differential Revision: https://reviews.llvm.org/D61111 llvm-svn: 359207
* Fixed typo in CompileUnit::GetImportedModules documentation [NFC]Raphael Isemann2019-04-251-1/+1
| | | | llvm-svn: 359206
* [Evaluator] Walk initial elements when handling load through bitcastRobert Lougher2019-04-253-38/+158
| | | | | | | | | | | | | | | | | | | | | | When evaluating a store through a bitcast, the evaluator tries to move the bitcast from the pointer onto the stored value. If the cast is invalid, it tries to "introspect" the type to get a valid cast by obtaining a pointer to the initial element (if the type is nested, this may require walking several initial elements). In some situations it is possible to get a bitcast on a load (e.g. with unions, where the bitcast may not be the same type as the store). However, equivalent logic to the store to introspect the type is missing. This patch add this logic. Note, when developing the patch I was unhappy with adding similar logic directly to the load case as it could get out of step. Instead, I have abstracted the "introspection" into a helper function, with the specifics being handled by a passed-in lambda function. Differential Revision: https://reviews.llvm.org/D60793 llvm-svn: 359205
* [GlobalISel][AArch64] Legalize G_FNEARBYINTJessica Paquette2019-04-258-2/+589
| | | | | | | | | Add legalizer support for G_FNEARBYINT. It's the same as G_FCEIL etc. Since the importer allows us to automatically select this after legalization, also add tests for selection etc. Also update arm64-vfloatintrinsics.ll. llvm-svn: 359204
* [GlobalISel] Add IRTranslator support for G_FNEARBYINTJessica Paquette2019-04-252-0/+10
| | | | | | | | | Translate llvm.nearbyint into G_FNEARBYINT as a simple intrinsic. Update arm64-irtranslator.ll. Differential Revision: https://reviews.llvm.org/D60922 llvm-svn: 359203
* [clangd] Use JSON streaming API for Trace rather than pasting strings. NFCSam McCall2019-04-252-30/+35
| | | | llvm-svn: 359202
* [GlobalISel] Add a G_FNEARBYINT opcodeJessica Paquette2019-04-254-0/+14
| | | | | | | | | | | For eventually selecting llvm.nearbyint. Equivalent to the SelectionDAG nearbyint node. Update legalizer-info-validation.mir. Differential Revision: https://reviews.llvm.org/D60921 llvm-svn: 359201
* [OPENMP] Improved check for the linear dependency in the non-rectangularAlexey Bataev2019-04-253-6/+46
| | | | | | | | | loop nests. Added a checks that the initializer/condition expressions depend only only of the single previous loop iteration variable. llvm-svn: 359200
* [scudo][standalone] Introduce the SizeClassMapKostya Kortchinsky2019-04-255-1/+190
| | | | | | | | | | | | | | | | | | | | | | Summary: As with the sanitizer_common allocator, the SCM allows for efficient mapping between sizes and size-classes, table-free. It doesn't depart significantly from the original, except that we allow the use of size-class 0 for other purposes (as opposed to chunks of size 0). The Primary will use it to hold TransferBatches. Reviewers: vitalybuka, eugenis, hctim, morehouse Reviewed By: vitalybuka Subscribers: srhines, mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D61088 llvm-svn: 359199
* Revert "[JITLink] Make the JITLink MachO/x86-64 eh-frame test work on Windows."Lang Hames2019-04-251-1/+6
| | | | | | This reverts r359169, as it broke one of the windows bots. llvm-svn: 359198
* [LLD][ELF] - Convert symbol-index.s testcase to a YAML test case. NFCI.George Rimar2019-04-253-10/+25
| | | | | | | | | | | | | | | This removes one more binary object from the inputs and fixes the test case description. Previously it said that: "symbol-index.elf has incorrect type of .symtab section. There is no symbol bodies because of that and any symbol index becomes incorrect." But the real reason of the failture was not the incorrect type of a symbol table, but invalid index of the symbol used in a relocation, what happened because previous test tried to read .symtab as a SHT_RELA section. llvm-svn: 359197
* gn build: Document llvm_enable_dia_sdk variable betterNico Weber2019-04-251-0/+2
| | | | llvm-svn: 359196
* gn build: Make setting llvm_enable_dia_sdk=true workNico Weber2019-04-252-2/+8
| | | | | | | | If this is set, %INCLUDE% must contain ".../DIA SDK/include" and %LIB% must contain ".../DIA SKD/lib/amd64" (assuming you're doing a 64-bit build). llvm-svn: 359195
* [LLD][ELF] - Move the test to a correct folder, remove excessive input. NFCI.George Rimar2019-04-253-50/+51
| | | | | | | | | This test should live in `invalid` folder. Also it was possible to avoid adding input with use of `-docnum=x` yaml2obj argument. llvm-svn: 359194
* [OPENMP][AARCH64]Fix the test for declare simd, NFC.Alexey Bataev2019-04-251-4/+4
| | | | | | | Renamed function a01 in the test to fix possible problems with the git hash match during testing. llvm-svn: 359193
* lld-link: Implement /swaprun: flagNico Weber2019-04-257-2/+78
| | | | | | | | | | | | | | | | r191276 added this to old LLD, but it never made it to new LLD -- except that the flag was in Options.td, so it was silently ignored. I figured it should be easy to implement, so I did that instead of removing the flags from Options.td. I then discovered that link.exe also supports comma-separated lists of 'cd' and 'net', which made the parsing code a bit annoying. The Alias technique in Options.td is to get nice help output. Differential Revision: https://reviews.llvm.org/D61067 llvm-svn: 359192
* [InstCombine][X86] Tweak generic expansion of PACKSS/PACKUS to shuffle then ↵Simon Pilgrim2019-04-251-7/+4
| | | | | | | | truncate. NFCI. This has no effect on constant folding but will be useful when we expand non-saturating PACKSS/PACKUS intrinsics. llvm-svn: 359191
* [Support] json::OStream::flush(), which passes through to the underlying streamSam McCall2019-04-251-1/+3
| | | | llvm-svn: 359190
* gn build: Merge r359179Nico Weber2019-04-252-0/+2
| | | | llvm-svn: 359189
* gn build: Merge r359174Nico Weber2019-04-251-0/+1
| | | | llvm-svn: 359188
* gn build: Merge r359142Nico Weber2019-04-251-0/+1
| | | | llvm-svn: 359187
* [Support] Add JSON streaming output API, faster where the heavy value types ↵Sam McCall2019-04-254-138/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aren't needed. Summary: There's still a little bit of constant factor that could be trimmed (e.g. more overloads to avoid round-tripping primitives through json::Value). But this solves the memory scaling problem, and greatly improves the performance constant factor, and the API should leave room for optimization if needed. Adapt TimeProfiler to use it, eliminating almost all the performance regression from r358476. Performance test on my machine: perf stat -r 5 ~/llvmbuild-opt/bin/clang++ -w -S -ftime-trace -mllvm -time-trace-granularity=0 spirit.cpp Handcrafted JSON (HEAD=r358532 with r358476 reverted): 2480ms json::Value (HEAD): 2757ms (+11%) After this patch: 2520 ms (+1.6%) Reviewers: anton-afanasyev, lebedev.ri Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60804 llvm-svn: 359186
* [InstCombine][X86] Add PACKSS/PACKUS tests for truncation where saturation ↵Simon Pilgrim2019-04-251-0/+160
| | | | | | won't occur llvm-svn: 359185
* Implement midpoint for floating point types. Reviewed as ↵Marshall Clow2019-04-258-1/+228
| | | | | | https://reviews.llvm.org/D61014. llvm-svn: 359184
* [Support] Try to unbreak windows buildbotIlya Biryukov2019-04-251-1/+1
| | | | | | After r359179. llvm-svn: 359183
* Parallel: only allow the first TaskGroup to run tasks parallellyFangrui Song2019-04-252-6/+29
| | | | | | | | | | | | | | | | | | | Summary: Concurrent (e.g. nested) llvm::parallel::for_each() may lead to dead locks. See PR35788 (fixed by rLLD322041) and PR41508 (fixed by D60757). When parallel_for_each() is about to return, in ~Latch() called by ~TaskGroup(), a thread (in the default executor) may block in Latch::sync() waiting for Count to become zero. If all threads in the default executor are blocked, it is a dead lock. To fix this, force serial execution if the current TaskGroup is not the first one. For a nested llvm::parallel::for_each(), this parallelizes the outermost loop and serializes inner loops. Differential Revision: https://reviews.llvm.org/D61115 llvm-svn: 359182
OpenPOWER on IntegriCloud