summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GlobalISel: Try to make legalize rules more useful for vectorsMatt Arsenault2019-02-077-38/+323
| | | | | | | Mostly keep the existing functions on scalars, but add versions which also operate based on the vector element size. llvm-svn: 353430
* Fix headers for files added in r353047Pavel Labath2019-02-073-12/+9
| | | | | | | I started working on that patch before the headers were updated. Since they were new files, I didn't get any conflicts during rebase. llvm-svn: 353429
* [DAG] Cleanup of unused node in SimplifySelectCC.Nirav Dave2019-02-071-8/+15
| | | | llvm-svn: 353428
* [x86] split more 256/512-bit shuffles in loweringSanjay Patel2019-02-076-104/+51
| | | | | | | | | | | | This is intentionally a small step because it's hard to know exactly where we might introduce a conflicting transform with the code that tries to form wider shuffles. But I think this is safe - if we have a wide shuffle with 2 operands, then we should do better with an extract + narrow shuffle. Differential Revision: https://reviews.llvm.org/D57867 llvm-svn: 353427
* [DAG] Cleanup unused node on failed SELECT Combine.Nirav Dave2019-02-071-0/+6
| | | | llvm-svn: 353426
* [ASTImporter] Refactor unittests to be able to parameterize them in a more ↵Gabor Marton2019-02-071-83/+110
| | | | | | | | | | | | | | | | | | | | | | flexible way Summary: Currently `TestImportBase` is derived from `ParameterizedTestsFixture` which explicitly states that the gtest parameter can be only an `ArgVector`. This is a limitation when we want to create tests which may have different parameters. E.g. we would like to create tests where we can combine different test parameters. So, for example we'd like gtest to be able to provide parameters of `<std::tuple<ArgVector, const char *>` instead of a simple `ArgVector`. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D57322 llvm-svn: 353425
* [llvm-ar][libObject] Fix relative paths when nesting thin archives.Jordan Rupprecht2019-02-075-67/+79
| | | | | | | | | | | | | | | | | | | Summary: When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, when flattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist). As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes. This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/10767545/ (see the second point). Reviewers: mstorsjo, pcc, ruiu, davide, david2050 Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57842 llvm-svn: 353424
* [clangd] Mention indexing in docs.Kadir Cetinkaya2019-02-071-0/+19
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D57392 llvm-svn: 353423
* [clangd] Reduce number of threads used by BackgroundIndex to number of ↵Kadir Cetinkaya2019-02-071-5/+6
| | | | | | | | | | | | | | | | | | | | | | | physical cores. Summary: clangd is using as many threads as logical cores for BackgroundIndex by default. We observed that it increases latency of foreground tasks. This patch aims to change that default to number of physical cores to get rid of that extra latency. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57819 llvm-svn: 353422
* [clangd] Fix an assertion failure in Selection.Haojian Wu2019-02-072-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The assertion is triggered when the Decl is null. Details for the assertion: F0207 09:55:09.069385 47308 logging.cc:84] assert.h assertion failed at llvm/include/llvm/Support/Casting.h:105 in static bool llvm::isa_impl_cl<clang::TranslationUnitDecl, const clang:: Decl *>::doit(const From *) [To = clang::TranslationUnitDecl, From = const clang::Decl *]: Val && "isa<> used on a null pointer" 15 *** Check failure stack trace: *** 19 @ 0x55615c1f7e06 __assert_fail 20 @ 0x55615a6297d8 clang::clangd::(anonymous namespace)::SelectionVisitor::TraverseDecl() 21 @ 0x55615a62f48d clang::RecursiveASTVisitor<>::TraverseTemplateTemplateParmDecl() 22 @ 0x55615a62b264 clang::RecursiveASTVisitor<>::TraverseDecl() 23 @ 0x55615a62979c clang::clangd::(anonymous namespace)::SelectionVisitor::TraverseDecl() 24 @ 0x55615a63060c clang::RecursiveASTVisitor<>::TraverseClassTemplatePartialSpecializationDecl() 25 @ 0x55615a62ae45 clang::RecursiveASTVisitor<>::TraverseDecl() Reviewers: sammccall Subscribers: javed.absar, kristof.beyls, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57879 llvm-svn: 353421
* Fix signed/unsigned mismatches in ProcessInfoTest.cppPavel Labath2019-02-071-1/+1
| | | | llvm-svn: 353420
* Fix incorrect log messages in NativeProcessLinux (pr40588)Pavel Labath2019-02-071-4/+4
| | | | | | | | | | | The "signal" argument was removed from the MonitorCallback function, but not from the log statements within it. This wasn't noticed because the name "signal" suddenly started referring to the libc function with that name. This fixes that. llvm-svn: 353419
* [scudo][standalone] Do not error out on spurious C(XX) flagsKostya Kortchinsky2019-02-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: The standalone Scudo version is being built with `-Werror` which can be tripped by extraneous command line arguments. We have little control over those as they can be passed down to us by `CMAKE_C(XX)_FLAGS`, the reported scenario involving `-stdlib=libc++` (see https://reviews.llvm.org/D57412#1384504). To work around this, disable `-Wunused-command-line-argument`. Reviewers: eugenis, vitalybuka, Eugene.Zelenko Reviewed By: eugenis Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D57757 llvm-svn: 353418
* [X86] Simplify casing. NFC.Nirav Dave2019-02-071-8/+8
| | | | llvm-svn: 353417
* [DAG] Cleanup unused nodes on failed store-to-load forward combine.Nirav Dave2019-02-071-9/+21
| | | | llvm-svn: 353416
* [ELF] Format lines inadvertently indented by rCTE353380Fangrui Song2019-02-071-5/+5
| | | | llvm-svn: 353415
* [clangd] Use Dex for dynamic index by default.Eric Liu2019-02-071-1/+1
| | | | | | | | | | | | | | | | | Summary: Memory usage for a sample TU: Without Dex: 17.9M With Dex: 24.4M The memory increase is considerable but seems tolerable. Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57878 llvm-svn: 353413
* [CodeView] Fix cycles in debug info when merging Types with global hashes Alexandre Ganea2019-02-078-34/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | When type streams with forward references were merged using GHashes, cycles were introduced in the debug info. This was caused by GlobalTypeTableBuilder::insertRecordAs() not inserting the record on the second pass, thus yielding an empty ArrayRef at that record slot. Later on, upon PDB emission, TpiStreamBuilder::commit() would skip that empty record, thus offseting all indices that came after in the stream. This solution comes in two steps: 1. Fix the hash calculation, by doing a multiple-step resolution, iff there are forward references in the input stream. 2. Fix merge by resolving with multiple passes, therefore moving records with forward references at the end of the stream. This patch also adds support for llvm-readoj --codeview-ghash. Finally, fix dumpCodeViewMergedTypes() which previously could reference deleted memory. Fixes PR40221 Differential Revision: https://reviews.llvm.org/D57790 llvm-svn: 353412
* Fix r350643 to limit COFF emission to <= 32 BYTES instead of BITS.Erich Keane2019-02-072-3/+8
| | | | | | | | | The patch in r350643 incorrectly sets the COFF emission based on bits instead of bytes. This patch converts the 32 via CharUnits to bits to compare the correct values. Change-Id: Icf38a16470ad5ae3531374969c033557ddb0d323 llvm-svn: 353411
* Breakpad: temporarily XFAIL line-table testsPavel Labath2019-02-074-0/+8
| | | | | | | | | | | | The tests are failing on windows because the paths in the symbol file are parsed using the host path style. I'm working on a patch to have SymbolFileBreakpad auto-detect the correct path style (similar to dwarf r351328). I originally wanted to make this a part of the initial line-table patch, but then I simply forgot. llvm-svn: 353410
* Fix misspelled filenames in file headersFangrui Song2019-02-0715-15/+15
| | | | llvm-svn: 353408
* tsan: add more benchmarksDmitry Vyukov2019-02-072-0/+100
| | | | | | | | | func_entry_exit.cc is for __tsan_func_entry/exit (spends ~75% there), we don't yet have any. mop.cc is for memory access functions, as compared to mini_bench_local/shared.cc this benchmark passes through deduplication logic (ContainsSameAccess). llvm-svn: 353407
* use_lldb_suite.py: Fix potential infinite loopPavel Labath2019-02-071-3/+4
| | | | | | | | | | | | | | The loop searching for use_lldb_suite_root had a bug where if the marker file happened to be missing, it would enter an infinite loop. While this shouldn't happen in normal circumstances, it can happen accidentally, and debugging it is not very pleasant. The loop had an exit condition, but it was incorrent (os.path.dirname returning None). This will never happen as dirname will just return the same folder over and over again once it reaches the root folder. This fixes the exit condition to account for that. llvm-svn: 353406
* Fix some warnings introduced in r353324 (ReproducerInstrumentation patch)Pavel Labath2019-02-073-8/+4
| | | | | | | | | | | | GetIndexForObjectImpl generated a bunch of "conversion casts away constness warnings". Change the function to use "const void *" (and static_cast, while I'm at it), to avoid this. Driver.cpp: unused variable "replay" (this was actually caused by a subsequent partial revert of this patch). I just finish the revert by removing the variable completely. llvm-svn: 353405
* SymbolFileBreakpad: Add line table supportPavel Labath2019-02-0713-55/+504
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch teaches SymbolFileBreakpad to parse the line information in breakpad files and present it to lldb. The trickiest question here was what kind of "compile units" to present to lldb, as there really isn't enough information in breakpad files to correctly reconstruct those. A couple of options were considered - have the entire file be one compile unit - have one compile unit for each FILE record - have one compile unit for each FUNC record The main drawback of the first approach is that all of the files would be considered "headers" by lldb, and so they wouldn't be searched if target.inline-breakpoint-strategy=never. The single compile unit would also be huge, and there isn't a good way to name it. The second approach will create mostly correct compile units for cpp files, but it will still be wrong for headers. However, the biggest drawback here seemed to be the fact that this can cause a compile unit to change mid-function (for example when a function from another file is inlined or another file is #included into a function). While I don't know of any specific thing that would break in this case, it does sound like a thing that we should avoid. In the end, we chose the third option, as it didn't seem to have any major disadvantages, though it was not ideal either. One disadvantage here is that this generates a large number of compile units, and there is still a question on how to name it. We chose to simply name it after the first line record in that function. This should be correct 99.99% of the time, though it can produce somewhat strange results if the very first line record comes from an #included file. Reviewers: clayborg, zturner, lemo, markmentovai Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56595 llvm-svn: 353404
* [LSR] Generate cross iteration indexesSam Parker2019-02-079-40/+1598
| | | | | | | | | | | | | | Modify GenerateConstantOffsetsImpl to create offsets that can be used by indexed addressing modes. If formulae can be generated which result in the constant offset being the same size as the recurrence, we can generate a pre-indexed access. This allows the pointer to be updated via the single pre-indexed access so that (hopefully) no add/subs are required to update it for the next iteration. For small cores, this can significantly improve performance DSP-like loops. Differential Revision: https://reviews.llvm.org/D55373 llvm-svn: 353403
* [clang-cl] support /Oy- on aarch64Martin Storsjo2019-02-072-4/+8
| | | | | | | | | | MSVC supports /Oy- on aarch64, so clang-cl should too. Patch by Nathan Froyd! Differential Revision: https://reviews.llvm.org/D57838 llvm-svn: 353402
* tsan: Optimize performance of Thread sanitizer memory access functionsDmitry Vyukov2019-02-074-18/+41
| | | | | | | | | | | | | | | | - Manually unwind code in MemoryAccessImpl1() because clang do not optimize it - Check for .rodata section only in read operations - Place LIKELY/UNLIKELY on fast paths This speeds up synthetic memory access benchmarks by 10-20%. [dvyukov: fixed up consts in check_analyze.sh] Author: yuri (Yuri Per) Reviewed in: https://reviews.llvm.org/D57882 Context: https://reviews.llvm.org/D54889 llvm-svn: 353401
* docs: add missingkeyfunction to doctree, fix titleHans Wennborg2019-02-072-2/+3
| | | | llvm-svn: 353399
* Typo: s/follwing/followingHans Wennborg2019-02-071-2/+2
| | | | llvm-svn: 353393
* [ARM GlobalISel] Support G_ICMP for Thumb2Diana Picus2019-02-075-104/+461
| | | | | | | Mark as legal and use the t2* equivalents of the arm mode instructions, e.g. t2CMPrr instead of plain CMPrr. llvm-svn: 353392
* sanitizers: Introduce ThreadType enumDmitry Vyukov2019-02-0718-35/+44
| | | | | | | | | | | | | Replace bool workerthread flag with ThreadType enum. This change is preparation for fiber support. [dvyukov: fixed build of sanitizer_thread_registry_test.cc] Author: yuri (Yuri Per) Reviewed in: https://reviews.llvm.org/D57839 Context: https://reviews.llvm.org/D54889 llvm-svn: 353390
* [clang-tidy] Fixed a std::bind() transformationJonas Toth2019-02-072-1/+45
| | | | | | | | There was an extra semicolon that was somehow working in some contexts. Patch by oleg.smolsky. llvm-svn: 353389
* [ARM] Reformat isRedundantFlagInstr for D57833. NFCDavid Green2019-02-071-8/+4
| | | | llvm-svn: 353386
* tsan: Implement pthread_exit() interceptor for Thread sanitizerDmitry Vyukov2019-02-072-0/+31
| | | | | | | | | | This change is preparation for fiber support. Author: yuri (Yuri Per) Reviewed in: https://reviews.llvm.org/D57876 Context: https://reviews.llvm.org/D54889 llvm-svn: 353385
* [BPF] add code-gen support for JMP32 instructionsJiong Wang2019-02-0710-49/+179
| | | | | | | | | | | | | | | | | | | | | | | JMP32 instructions has been added to eBPF ISA. They are 32-bit variants of existing BPF conditional jump instructions, but the comparison happens on low 32-bit sub-register only, therefore some unnecessary extensions could be saved. JMP32 instructions will only be available for -mcpu=v3. Host probe hook has been updated accordingly. JMP32 instructions will only be enabled in code-gen when -mattr=+alu32 enabled, meaning compiling the program using sub-register mode. For JMP32 encoding, it is a new instruction class, and is using the reserved eBPF class number 0x6. This patch has been tested by compiling and running kernel bpf selftests with JMP32 enabled. Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> llvm-svn: 353384
* AArch64: implement copy for paired GPR registers.Tim Northover2019-02-073-0/+68
| | | | | | | When doing 128-bit atomics using CASP we might need to copy a GPRPair to a different register, but that was unimplemented up to now. llvm-svn: 353383
* [clang-tidy] Expand and clarify the NOLINT documentation a bit.Alexander Kornienko2019-02-071-11/+32
| | | | llvm-svn: 353382
* Fix documentation formatting for ShellExpandArgumentsRaphael Isemann2019-02-072-6/+6
| | | | llvm-svn: 353381
* [clangd] Suggest adding missing includes for typos (like include-fixer).Eric Liu2019-02-075-34/+329
| | | | | | | | | | | | | | | | | | | Summary: This adds include-fixer feature into clangd based on D56903. Clangd now captures diagnostics caused by typos and attach include insertion fixes to potentially fix the typo. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, MaskRay, javed.absar, ilya-biryukov, mgorny Tags: #clang Differential Revision: https://reviews.llvm.org/D57021 llvm-svn: 353380
* [LLD][ELF] - Set DF_STATIC_TLS flag for X64 targetGeorge Rimar2019-02-075-33/+54
| | | | | | | | | | | | This is the same as D57749, but for x64 target. "ELF Handling For Thread-Local Storage" p41 says (https://www.akkadia.org/drepper/tls.pdf): R_X86_64_GOTTPOFF relocation is used for IE TLS models. Hence if linker sees this relocation we should add DF_STATIC_TLS flag. Differential revision: https://reviews.llvm.org/D57821 llvm-svn: 353378
* [sanitizer] Fix Android testsVitaly Buka2019-02-071-0/+2
| | | | | | On Android some fields can be null llvm-svn: 353377
* [CMake] Mark runtime library link libraries as privatePetr Hosek2019-02-071-1/+1
| | | | | | | | | There's no need to expose these dependencies to consumers. This matches the change made to other runtimes in D57456. Differential Revision: https://reviews.llvm.org/D57873 llvm-svn: 353376
* [BranchFolding] Remove dead code for handling EHPad blocksCraig Topper2019-02-071-23/+0
| | | | | | | | | | | | | | | | Summary: This code tries to handle the case where IBB is an EHPad, but there's an earlier check that uses PBB->hasEHPadSuccessor(). Where PBB is a predecessor of IBB. The hasEHPadSuccessor function would have visited IBB and seen that it was an EHPad and returned false. This would prevent us from reaching this code with IBB as an EHPad. Looks like this code was originally added in rL37427 (ancient) and made dead in rL143001. Reviewers: rnk, void, efriedma Reviewed By: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D57358 llvm-svn: 353375
* Bump minimum toolchain versionJF Bastien2019-02-074-40/+87
| | | | | | | | | | | | | | | Summary: The RFC on moving past C++11 got good traction: http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html This patch therefore bumps the toolchain versions according to our policy: llvm.org/docs/DeveloperPolicy.html#toolchain Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane Differential Revision: https://reviews.llvm.org/D57264 llvm-svn: 353374
* Move the SMT API to LLVMMikhail R. Gadelha2019-02-0716-199/+227
| | | | | | | | Moved everything SMT-related to LLVM and updated the cmake scripts. Differential Revision: https://reviews.llvm.org/D54978 llvm-svn: 353373
* Moved the whole SMT API to a single file. NFC.Mikhail R. Gadelha2019-02-074-160/+108
| | | | | | | | | | There is no advantage in having them in separate files, I doubt some will ever use them separately. This also makes it easier to move the API to LLVM. Differential Revision: https://reviews.llvm.org/D54977 llvm-svn: 353372
* Got rid of the `Z3ConstraintManager` classMikhail R. Gadelha2019-02-072-20/+4
| | | | | | | | | | Now, instead of passing the reference to a shared_ptr, we pass the shared_ptr instead. I've also removed the check if Z3 is present in CreateZ3ConstraintManager as this function already calls CreateZ3Solver that performs the exactly same check. Differential Revision: https://reviews.llvm.org/D54976 llvm-svn: 353371
* Generalised the SMT state constraintsMikhail R. Gadelha2019-02-075-43/+59
| | | | | | | | | | | | | | This patch moves the ConstraintSMT definition to the SMTConstraintManager header to make it easier to move the Z3 backend around. We achieve this by not using shared_ptr anymore, as llvm::ImmutableSet doesn't seem to like it. The solver specific exprs and sorts are cached in the Z3Solver object now and we move pointers to those objects around. As a nice side-effect, SMTConstraintManager doesn't have to be a template anymore. Yay! Differential Revision: https://reviews.llvm.org/D54975 llvm-svn: 353370
* gn build: Merge the test part of r353237.Peter Collingbourne2019-02-071-0/+1
| | | | llvm-svn: 353369
OpenPOWER on IntegriCloud