summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Revert [Windows] Disable TrapUnreachable for Win64, add SEH_NoReturnReid Kleckner2019-09-0321-145/+38
| | | | | | | | | | | | | | | | | | This reverts r370525 (git commit 0bb1630685fba255fa93def92603f064c2ffd203) Also reverts r370543 (git commit 185ddc08eed6542781040b8499ef7ad15c8ae9f4) The approach I took only works for functions marked `noreturn`. In general, a call that is not known to be noreturn may be followed by unreachable for other reasons. For example, there could be multiple call sites to a function that throws sometimes, and at some call sites, it is known to always throw, so it is followed by unreachable. We need to insert an `int3` in these cases to pacify the Windows unwinder. I think this probably deserves its own standalone, Win64-only fixup pass that runs after block placement. Implementing that will take some time, so let's revert to TrapUnreachable in the mean time. llvm-svn: 370829
* [WebAssembly] Compare functions by names in Emscripten SjljHeejin Ahn2019-09-032-64/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This removes all string constants for function names and compares functions by string directly when needed. Many of these constants are used only once or twice so the benefit of defining them separately is not very clear, and this actually fixes a bug. When we already have a `malloc` declaration which is an alias to something else within the module, ``` @malloc = weak hidden alias i8* (i32), i8* (i32)* @dlmalloc ``` (this happens compiling with emscripten with `-s WASM_OBJECT_FILES=0` because all bc files are merged before being fed into `wasm-ld` which runs the backend optimizations as LTO) `Module::getFunction("malloc")` in `canLongjmp` returns `nullptr` because `Module::getFunction` dyncasts pointer into `Function`, but the alias is a `GlobalValue` but not a `Function`. This makes `canLongjmp` return false for `malloc` in this case, and we end up adding a lot of longjmp handling code around malloc. This is not only a code size increase but actually a bug because `malloc` is used in the entry block when preparing for setjmp tables for emscripten sjlj handling, and this makes initial setjmp preparation, which has to happen in the entry block, move to another split block, and this interferes with SSA update later. This also adds two more functions, `getTempRet0` and `setTempRet0`, in the list of not longjmp-able functions. Fixes https://github.com/emscripten-core/emscripten/issues/8935. Reviewers: sbc100 Subscribers: mehdi_amini, jgravelle-google, hiraditya, sunfish, dexonsmith, dschuff, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67129 llvm-svn: 370828
* [llvm-profdata] Add mode to recover from profile read failuresVedant Kumar2019-09-034-78/+89
| | | | | | | | | | Add a mode in which profile read errors are not immediately treated as fatal. In this mode, merging makes forward progress and reports failure only if no inputs can be read. Differential Revision: https://reviews.llvm.org/D66985 llvm-svn: 370827
* [InstrProf] Tighten a check for malformed data records in raw profilesVedant Kumar2019-09-034-6/+23
| | | | | | | | | | | | | The check needs to validate a counter offset before performing pointer arithmetic with the (potentially corrupt) offset. Found by UBSan's pointer overflow check. rdar://54843625 Differential Revision: https://reviews.llvm.org/D66979 llvm-svn: 370826
* [libclang][test][NFC] Split off fixture from tests.Jan Korous2019-09-032-71/+95
| | | | llvm-svn: 370825
* [GVN] Remove a todo introduced w/rL370791Philip Reames2019-09-031-3/+0
| | | | | | | | | | When I dug into this, it turns out to be *much* more involved than I'd realized and doesn't actually simplify anything. The general purpose of the leader table is that we want to find the most-dominating definition quickly. The problem for equivalance folding is slightly different; we want to find the most dominating *value* whose definition block dominates our use quickly. To make this change, we'd end up having to restructure the leader table (either the sorting thereof, or maybe even introducing multiple leader tables per value) and that complexity is just not worth it. llvm-svn: 370824
* [AArch64][GlobalISel] Legalize 128 bit divisions to libcalls.Amara Emerson2019-09-033-4/+116
| | | | | | | | | Now that we have the infrastructure to support s128 types as parameters we can expand these to libcalls. Differential Revision: https://reviews.llvm.org/D66185 llvm-svn: 370823
* [GlobalISel][CallLowering] Add support for splitting types according to ↵Amara Emerson2019-09-0312-84/+242
| | | | | | | | | | | | | | calling conventions. On AArch64, s128 types have to be split into s64 GPRs when passed as arguments. This change adds the generic support in call lowering for dealing with multiple registers, for incoming and outgoing args. Support for splitting for return types not yet implemented. Differential Revision: https://reviews.llvm.org/D66180 llvm-svn: 370822
* [MemorySSA] Disable MemorySSA use.Alina Sbirlea2019-09-036-53/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D58311 llvm-svn: 370821
* [Attributor] Use the delete API for livenessJohannes Doerfert2019-09-033-16/+24
| | | | | | | | | | | | Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66833 llvm-svn: 370818
* [Attributor] Deduce "no-capture" argument attributeJohannes Doerfert2019-09-0313-127/+579
| | | | | | | | | | | | | | Add the no-capture argument attribute deduction to the Attributor fixpoint framework. The new string attributed "no-capture-maybe-returned" is introduced to allow deduction of no-capture through functions that "capture" an argument but only by "returning" it. It is only used by the Attributor for testing. Differential Revision: https://reviews.llvm.org/D59922 llvm-svn: 370817
* reland "[lld-link] implement -start-lib and -end-lib"Bob Haarman2019-09-0315-70/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a re-land of r370487 with a fix for the use-after-free bug that rev contained. This implements -start-lib and -end-lib flags for lld-link, analogous to the similarly named options in ld.lld. Object files after -start-lib are included in the link only when needed to resolve undefined symbols. The -end-lib flag goes back to the normal behavior of always including object files in the link. This mimics the semantics of static libraries, but without needing to actually create the archive file. Reviewers: ruiu, smeenai, MaskRay Reviewed By: ruiu, MaskRay Subscribers: akhuang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66848 llvm-svn: 370816
* [Driver] Remove duplicate option parsing (NFC)Jonas Devlieghere2019-09-031-8/+1
| | | | | | | | We were checking OPT_no_use_colors three times, twice to disable colors and once to enable debug mode. This simplifies things and now the option is only checked once. llvm-svn: 370814
* [CodeGen] Use FSHR in DAGTypeLegalizer::ExpandIntRes_MULFIXBjorn Pettersson2019-09-035-136/+99
| | | | | | | | | | | | | | | | | | | | | | | Summary: Simplify the right shift of the intermediate result (given in four parts) by using funnel shift. There are some impact on lit tests, but that seems to be related to register allocation differences due to how FSHR is expanded on X86 (giving a slightly different operand order for the OR operations compared to the old code). Reviewers: leonardchan, RKSimon, spatel, lebedev.ri Reviewed By: RKSimon Subscribers: hiraditya, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, s.egerton, pzheng, bevinh, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67036 llvm-svn: 370813
* Skip MCJIT unit tests if LLVM is not configured for native compilationDavid Blaikie2019-09-031-1/+7
| | | | | | | | Patch by Sergej Jaskiewicz! Differential Revision: D67089 llvm-svn: 370812
OpenPOWER on IntegriCloud