summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [NFC] Fixed testDavid Bolvansky2019-09-041-2/+2
| | | | llvm-svn: 370888
* [lldb] Fix log statement in Socket::WriteRaphael Isemann2019-09-041-1/+2
| | | | | | | | We change num_bytes in this method, so this doesn't actually log the parameter that we called the function with. No test as we don't test logging code. llvm-svn: 370887
* [NFC] Adjust tests for new foldDavid Bolvansky2019-09-041-4/+4
| | | | llvm-svn: 370886
* [NFC] Added tests for new foldDavid Bolvansky2019-09-041-0/+101
| | | | llvm-svn: 370885
* [clangd] Fix SelectionTree behavior on implicit 'this'Sam McCall2019-09-042-0/+15
| | | | llvm-svn: 370884
* [InstCombine] Fold sub (or A, B) (and A, B) to (xor A, B)David Bolvansky2019-09-042-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ``` Name: sub or and to xor %or = or i32 %y, %x %and = and i32 %x, %y %sub = sub i32 %or, %and => %sub = xor i32 %x, %y Optimization: sub or and to xor Done: 1 Optimization is correct! ``` https://rise4fun.com/Alive/eJu Reviewers: spatel, lebedev.ri Reviewed By: lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67153 llvm-svn: 370883
* Fix address sizes in the dwarfdump-debug-loc-error-cases testPavel Labath2019-09-041-10/+10
| | | | | | | | | the test is building a 64-bit executable, so the addresses should be 64-bit too. The test was still passing even with smaller address size, but it was hitting the "unexpected end of data" error sooner than it should. llvm-svn: 370882
* [NFC] Added a new test for D67153David Bolvansky2019-09-041-0/+13
| | | | llvm-svn: 370881
* [lldb] Limit the amount of zeroes we use for padding when printing small floatsRaphael Isemann2019-09-048-4/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We got a radar that printing small floats is not very user-friendly in LLDB as we print them with up to 100 leading zeroes before starting to use scientific notation. This patch changes this by already using scientific notation when we hit 6 padding zeroes by default and moves this value into a target setting so that users can just set this number back to 100 if they for some reason preferred the old behaviour. This new setting is influencing how we format data, so that's why we have to reset the data visualisation cache when it is changed. Note that we have always been using scientific notation for large numbers because it seems that the LLVM implementation doesn't support printing out the padding zeroes for them. I would have fixed that if it was trivial, but looking at the LLVM implementation for this it seems that this is not as trivial as it sounds. I would say we look into this if we ever get a bug report about someone wanting to have a large amount of trailing zeroes in their numbers instead of using scientific notation. Fixes rdar://39744137 Reviewers: #lldb, clayborg Reviewed By: clayborg Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67001 llvm-svn: 370880
* [lldb] Early exit in RangeDataVector:FindEntryIndexesThatContainRaphael Isemann2019-09-041-6/+8
| | | | | | | | | | | | | | | | | | | Summary: We currently spend a lot of time in this function (around 27% of the br-by-regex benchmark in lldb-bench) by just iterating over all the ranges. We already sorted these ranges by their base address, we we can actually just stop checking ranges as soon as we find one that has a higher base address. Reviewers: labath Reviewed By: labath Subscribers: amccarth, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67123 llvm-svn: 370879
* [NFC] Added tests for 'SUB of OR and AND to XOR' foldDavid Bolvansky2019-09-041-0/+103
| | | | llvm-svn: 370878
* [DebugInfo] LiveDebugValues: locations with different exprs should not be mergedJeremy Morse2019-09-042-7/+92
| | | | | | | | | | | | | | | | | When comparing variable locations, LiveDebugValues currently considers only the machine location, ignoring any DIExpression applied to it. This is a problem because that DIExpression can do pretty much anything to the machine location, for example dereferencing it. This patch adds DIExpressions to that comparison; now variables based on the same register/memory-location but with different expressions will compare differently, and be dropped if we attempt to merge them between blocks. This reduces variable coverage-range a little, but only because we were producing broken locations. Differential Revision: https://reviews.llvm.org/D66942 llvm-svn: 370877
* gn build: Merge r370862Nico Weber2019-09-042-2/+2
| | | | llvm-svn: 370876
* [ELF] Fix spell corrector: don't call elf::InputFile::getSymbols() on shared ↵Fangrui Song2019-09-041-1/+1
| | | | | | | | objects Exposed by pr34872.s llvm-svn: 370875
* Revert "[Clang Interpreter] Initial patch for the constexpr interpreter"Roman Lebedev2019-09-0470-9099/+390
| | | | | | | | | Breaks BUILD_SHARED_LIBS build, introduces cycles in library dependency graphs. (clangInterp depends on clangAST which depends on clangInterp) This reverts r370839, which is an yet another recommit of D64146. llvm-svn: 370874
* [cmake] Remove MSVC C4180 overrideSimon Pilgrim2019-09-041-1/+0
| | | | | | | | Tested on VS2017 and VS2019 llvm/clang builds with WX enabled - its no longer necessary to disable this warning. Differential Revision: https://reviews.llvm.org/D67103 llvm-svn: 370871
* [LiveDebugValues][NFC] Silence an unused variable warningJeremy Morse2019-09-041-0/+1
| | | | | | | | On release builds, 'MI' isn't used by anything (it's already inserted into a block by BuildMI), while on non-release builds it's used by a LLVM_DEBUG statement. Mark as explicitly used to avoid the warning. llvm-svn: 370870
* [clangd] Remove macro-expansion-location from getBeginningOfIdentifier. ↵Sam McCall2019-09-044-20/+26
| | | | | | Inline into relevant callsites. NFC llvm-svn: 370869
* DWARF: Fix a regression in location list dumpingPavel Labath2019-09-045-28/+277
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: While fixing the handling of some error cases, r370363 introduced new problems -- assertion failures due to unchecked errors (my excuse is that a very early version of that patch used Optional<T> instead of Expected). This patch adds proper handling of parsing errors encountered when dumping location lists from inside DWARF DIEs, and adds a bunch of additional tests. I reorder the arguments of the location list dumping functions to make them consistent, and also be able to dump the two kinds of location lists generically. Reviewers: JDevlieghere, dblaikie, probinson Subscribers: aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67102 llvm-svn: 370868
* [cmake] Remove MSVC C4258 overrideSimon Pilgrim2019-09-041-1/+0
| | | | | | | | Tested on VS2017 and VS2019 llvm/clang builds with WX enabled - its no longer necessary to disable this warning. Differential Revision: https://reviews.llvm.org/D67047 llvm-svn: 370866
* [clangd] Remove obsolete includes. NFCSam McCall2019-09-043-4/+2
| | | | llvm-svn: 370865
* [clangd] Move threading helper to more appropriate header. NFCSam McCall2019-09-043-15/+15
| | | | llvm-svn: 370864
* Code cleanup: Change FormattersContainer::KeyType from SP to rvalueJan Kratochvil2019-09-0413-108/+106
| | | | | | | | | | | There is now std::shared_ptr passed around which is expensive for manycore CPUs. Most of the times (except for 3 cases) it is now just std::moved with no CPU locks needed. It also makes it possible to sort the keys (which is now not needed much after D66398). Differential revision: https://reviews.llvm.org/D67049 llvm-svn: 370863
* [clangd] Rename ClangdUnit.h -> ParsedAST.h. NFCSam McCall2019-09-0431-44/+65
| | | | | | | | | | This much better reflects what is (now) in this header. Maybe a rename to ParsedTU would be an improvement, but that's a much more invasive change and life is too short. ClangdUnit is dead, long live ClangdUnitTests! llvm-svn: 370862
* [llvm-dwarfdump] Fix spelling in the comments. NFCDjordje Todorovic2019-09-041-2/+2
| | | | llvm-svn: 370861
* [llvm-objcopy] Add objcopy::elf::Object::allocSections to simplify loops on ↵Fangrui Song2019-09-042-22/+21
| | | | | | | | | | SHF_ALLOC sections Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D67142 llvm-svn: 370860
* Add LLDB reformatting to .git-blame-ignore-revsRaphael Isemann2019-09-041-0/+3
| | | | llvm-svn: 370859
* Port TestBatchMode to PExpectTest classPavel Labath2019-09-042-91/+56
| | | | | | | | | | | | | | | Summary: I'm doing this mainly for consistency, but there are also other cleanups that will be enabled by this (e.g., the automatic setting of clang-modules-cache-path setting). Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67082 llvm-svn: 370858
* [yaml2obj] Support PT_GNU_STACK and PT_GNU_RELROFangrui Song2019-09-043-1/+15
| | | | | | | | | | | | | PT_GNU_STACK is used in an llvm-objcopy test. I plan to use PT_GNU_RELRO in a patch to improve nested segment processing in llvm-objcopy (PR42963). Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D67146 llvm-svn: 370857
* [lldb][NFC] Rename ReadRegisterValue to PrintRegisterValueRaphael Isemann2019-09-041-95/+95
| | | | | | | That was the actual name I had in mind, but it seems git didn't pick that change up when committing my previous commit. llvm-svn: 370856
* Add .git-blame-ignore-revs fileRui Ueyama2019-09-041-0/+15
| | | | | | | | | | | | | This new file is intended to be used to list sweeping changes such as mass reformatting or renaming. You can configure git-blame so that the command ignores commits listed in this file. The initial contents of this file is two commit hashes which did mass renaming to the lld directory. Differential Revision: https://reviews.llvm.org/D67145 llvm-svn: 370855
* [lldb][NFC] Remove WriteRegister copy-pasta from ObjectFileMachORaphael Isemann2019-09-041-198/+119
| | | | | | | | | | | | The function had the same name as one of the member function, so it was just copied to all classes so that the lookup works. We could also give the function a more better and unique name (because it's actually printing the register value and writing to the stream, not writing to the register). Also removes the unused return value. llvm-svn: 370854
* [ELF] Add a spell corrector for "undefined symbol" diagnosticsFangrui Song2019-09-042-5/+149
| | | | | | | | | | | | | | | | | | | | | | | Non-undefined symbols with Levenshtein distance 1 or a transposition are suggestion candidates. This is probably good enough and it can suggest some missing/superfluous qualifiers: const, restrict, volatile, & and && ref-qualifier, e.g. error: undefined symbol: foo(int*) >>> referenced by b.o:(.text+0x1) +>>> did you mean: foo(int const*) +>>> defined in: a.o error: undefined symbol: foo(int*&) >>> referenced by b.o:(.text+0x1) +>>> did you mean: foo(int*) +>>> defined in: b.o Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D67039 llvm-svn: 370853
* [llvm-objcopy] Rename variable names "Section" to "Sec". NFCFangrui Song2019-09-042-71/+65
| | | | | | | | | | | | | | "Section" can refer to the type llvm::objcopy::elf::Section or the variable name. Rename it to "Sec" for clarity. "Sec" is already used a lot, so this change improves consistency as well. Also change `auto` to `const SectionBase` for readability. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D67143 llvm-svn: 370852
* [ARM][ParallelDSP] SExt mul for accumulationSam Parker2019-09-045-5/+389
| | | | | | | | | | For any unpaired muls, we accumulate them as an input to the reduction. Check the type of the mul and perform a sext if the existing accumlator input type is not the same. Differential Revision: https://reviews.llvm.org/D66993 llvm-svn: 370851
* Re-commit r363191 "[MS] Pretend constexpr variable template specializations ↵Hans Wennborg2019-09-042-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | are inline" While the next Visual Studio update (16.3) will fix this issue, that hasn't shipped yet. Until then Clang wouldn't work with MSVC's headers which seems unfortunate. Let's keep this in until VS 16.3 ships. (See also PR42843.) > Fixes link errors with clang and the latest Visual C++ 14.21.27702 > headers, which was reported as PR42027. > > I chose to intentionally make these things linkonce_odr, i.e. > discardable, so that we don't emit definitions of these things in every > translation unit that includes STL headers. > > Note that this is *not* what MSVC does: MSVC has not yet implemented C++ > DR2387, so they emit fully specialized constexpr variable templates with > static / internal linkage. > > Reviewers: rsmith > > Differential Revision: https://reviews.llvm.org/D63175 llvm-svn: 370850
* [IRPrinting] Improve module pass printer to work better with -filter-print-funcsTaewook Oh2019-09-042-5/+31
| | | | | | | | | | | | | | Summary: Previously module pass printer pass prints the banner even when the module doesn't include any function provided with `-filter-print-funcs` option. This introduced a lot of noise, especailly with ThinLTO. This diff addresses the issue and makes the banner printed only when the module includes functions in `-filter-print-funcs` list. Reviewers: fedor.sergeev Subscribers: mehdi_amini, hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66560 llvm-svn: 370849
* [lldb][NFC] Add a simple test for thread_local storage.Raphael Isemann2019-09-043-0/+25
| | | | | | | Seems we fail to read TLS data on Linux, so the test only runs on macOS for now. We will see how this test runs on the BSD bots. llvm-svn: 370848
* [GlobalISel] Fix G_SEXT narrowScalar to bail out of unsupported type ↵Amara Emerson2019-09-041-3/+7
| | | | | | | | | | | combination. Similar to the issue with G_ZEXT that was fixed earlier, this is a quick to fall back if the source type is not exactly half of the dest type. Fixes the clang-cmake-aarch64-lld bot build. llvm-svn: 370847
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-04557-1581/+552
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of each test case knowing its depth relative to the test root, we can just have dotest add the folder containing Makefile.rules to the include path. This was motivated by r370616, though I have been wanting to do this ever since we moved to building tests out-of-tree. The only manually modified files in this patch are lldbinline.py and plugins/builder_base.py. The rest of the patch has been produced by this shell command: find . \( -name Makefile -o -name '*.mk' \) -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} + Reviewers: teemperor, aprantl, espindola, jfb Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D67083 llvm-svn: 370845
* gn build: Merge r370843Nico Weber2019-09-041-0/+1
| | | | llvm-svn: 370844
* [clangd] Split Preamble.h out of ClangdUnit.h. NFCSam McCall2019-09-0412-236/+297
| | | | | | | | | | | | | | Summary: Add comment describing use of preamble in clangd. Remove deps on ClangdUnit.h where possible. Subscribers: mgorny, ilya-biryukov, javed.absar, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67117 llvm-svn: 370843
* [lldb] [test] Mark 'reenabled' tests XFAIL on NetBSDMichal Gorny2019-09-045-0/+5
| | | | llvm-svn: 370842
* Add a newline at the end of the fileRui Ueyama2019-09-041-1/+1
| | | | llvm-svn: 370841
* [lldb] [test] Un-mark two commands/register tests XFAILMichal Gorny2019-09-041-2/+0
| | | | llvm-svn: 370840
* [Clang Interpreter] Initial patch for the constexpr interpreterNandor Licker2019-09-0470-390/+9099
| | | | | | | | | | | | | | | | | | Summary: This patch introduces the skeleton of the constexpr interpreter, capable of evaluating a simple constexpr functions consisting of if statements. The interpreter is described in more detail in the RFC. Further patches will add more features. Reviewers: Bigcheese, jfb, rsmith Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64146 llvm-svn: 370839
* [llvm-objcopy] Fix some identifier names in comments. NFCFangrui Song2019-09-041-5/+5
| | | | llvm-svn: 370838
* [RISCV] Enable tail call opt for variadic functionJim Lin2019-09-042-7/+2
| | | | | | | | | | | | | | | | Summary: Tail call opt can treat variadic function call the same as normal function call Reviewers: mgrang, asb, lenary, lewis-revill Reviewed By: lenary Subscribers: luismarques, pzheng, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, s.egerton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66278 llvm-svn: 370835
* [MemorySSA] Move two verify calls under expensive checks.Alina Sbirlea2019-09-041-2/+2
| | | | llvm-svn: 370831
* [NFC][llvm-ifs] Adding .ifs files to the test list for llvm-ifs tool.Puyan Lotfi2019-09-041-0/+1
| | | | llvm-svn: 370830
OpenPOWER on IntegriCloud