summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* RewriteModernObjC - silence static analyzer getAs<> null dereference ↵Simon Pilgrim2019-10-071-7/+7
| | | | | | | | warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. llvm-svn: 373905
* AST - silence static analyzer getAs<> null dereference warnings. NFCI.Simon Pilgrim2019-10-076-14/+11
| | | | | | The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. llvm-svn: 373904
* [LLVM-C] Add bindings to create macro debug infowhitequark2019-10-074-39/+137
| | | | | | | | | | | | | | | | Summary: The C API doesn't have the bindings to create macro debug information. Reviewers: whitequark, CodaFi, deadalnix Reviewed By: whitequark Subscribers: aprantl, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58334 llvm-svn: 373903
* Fix sphinx warnings.Kevin P. Neal2019-10-071-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D64746 llvm-svn: 373902
* Test commitMirko Brkusanin2019-10-071-1/+1
| | | | | | Fix comment. llvm-svn: 373901
* [FPEnv] Add constrained intrinsics for lrint and lroundKevin P. Neal2019-10-0716-28/+516
| | | | | | | | | | | Earlier in the year intrinsics for lrint, llrint, lround and llround were added to llvm. The constrained versions are now implemented here. Reviewed by: andrew.w.kaylor, craig.topper, cameron.mcinally Approved by: craig.topper Differential Revision: https://reviews.llvm.org/D64746 llvm-svn: 373900
* gn build: use better triple on windowsNico Weber2019-10-071-1/+1
| | | | | | | | | | | The CMake build uses "x86_64-pc-windows-msvc". The "-msvc" suffix is important because e.g. clang/test/lit.cfg.py matches against the suffix "windows-msvc" to compute the presence of the "ms-sdk" and the absence of the "LP64" feature. Differential Revision: https://reviews.llvm.org/D68572 llvm-svn: 373899
* Revert r373888 "[IA] Recognize hexadecimal escape sequences"Nico Weber2019-10-072-21/+1
| | | | | | | | | It broke MC/AsmParser/directive_ascii.s on all bots: Assertion failed: (Index < Length && "Invalid index!"), function operator[], file ../../llvm/include/llvm/ADT/StringRef.h, line 243. llvm-svn: 373898
* [clangd] Catch an unchecked "Expected<T>" in HeaderSourceSwitch.Haojian Wu2019-10-074-3/+12
| | | | | | | | | | | | | | Summary: Also fixes a potential user-after-scope issue of "Path". Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68564 llvm-svn: 373897
* [ASTImporter][NFC] Enable disabled but passing testGabor Marton2019-10-071-4/+1
| | | | | | RedeclChainShouldBeCorrectAmongstNamespaces llvm-svn: 373896
* [ASTImporter][NFC] Update ASTImporter internals docsGabor Marton2019-10-071-11/+2
| | | | llvm-svn: 373895
* [ASTImporter][NFC] Fix typo in user docsGabor Marton2019-10-071-1/+1
| | | | llvm-svn: 373894
* [AMDGPU] Fix test checksJay Foad2019-10-071-2/+4
| | | | | | | | The GFX10-DENORM-STRICT checks were only passing by accident. Fix them to make the test more robust in the face of scheduling or register allocation changes. llvm-svn: 373893
* [clangd] If an undocumented definition exists, don't accept documentation ↵Sam McCall2019-10-072-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | from other forward decls. Summary: This fixes cases like: foo.h class Undocumented{} bar.h // break an include cycle. we should refactor this! class Undocumented; Where the comment doesn't describe the class. Note that a forward decl that is *visible to the definition* will still have its doc comment used, by SymbolCollector: Merge isn't involved here. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68467 llvm-svn: 373892
* [lldb][ELF] Read symbols from .gnu_debugdata sect.Konrad Kleine2019-10-0715-8/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If the .symtab section is stripped from the binary it might be that there's a .gnu_debugdata section which contains a smaller .symtab in order to provide enough information to create a backtrace with function names or to set and hit a breakpoint on a function name. This change looks for a .gnu_debugdata section in the ELF object file. The .gnu_debugdata section contains a xz-compressed ELF file with a .symtab section inside. Symbols from that compressed .symtab section are merged with the main object file's .dynsym symbols (if any). In addition we always load the .dynsym even if there's a .symtab section. For example, the Fedora and RHEL operating systems strip their binaries but keep a .gnu_debugdata section. While gdb already can read this section, LLDB until this patch couldn't. To test this patch on a Fedora or RHEL operating system, try to set a breakpoint on the "help" symbol in the "zip" binary. Before this patch, only GDB can set this breakpoint; now LLDB also can do so without installing extra debug symbols: lldb /usr/bin/zip -b -o "b help" -o "r" -o "bt" -- -h The above line runs LLDB in batch mode and on the "/usr/bin/zip -h" target: (lldb) target create "/usr/bin/zip" Current executable set to '/usr/bin/zip' (x86_64). (lldb) settings set -- target.run-args "-h" Before the program starts, we set a breakpoint on the "help" symbol: (lldb) b help Breakpoint 1: where = zip`help, address = 0x00000000004093b0 Once the program is run and has hit the breakpoint we ask for a backtrace: (lldb) r Process 10073 stopped * thread #1, name = 'zip', stop reason = breakpoint 1.1 frame #0: 0x00000000004093b0 zip`help zip`help: -> 0x4093b0 <+0>: pushq %r12 0x4093b2 <+2>: movq 0x2af5f(%rip), %rsi ; + 4056 0x4093b9 <+9>: movl $0x1, %edi 0x4093be <+14>: xorl %eax, %eax Process 10073 launched: '/usr/bin/zip' (x86_64) (lldb) bt * thread #1, name = 'zip', stop reason = breakpoint 1.1 * frame #0: 0x00000000004093b0 zip`help frame #1: 0x0000000000403970 zip`main + 3248 frame #2: 0x00007ffff7d8bf33 libc.so.6`__libc_start_main + 243 frame #3: 0x0000000000408cee zip`_start + 46 In order to support the .gnu_debugdata section, one has to have LZMA development headers installed. The CMake section, that controls this part looks for the LZMA headers and enables .gnu_debugdata support by default if they are found; otherwise or if explicitly requested, the minidebuginfo support is disabled. GDB supports the "mini debuginfo" section .gnu_debugdata since v7.6 (2013). Reviewers: espindola, labath, jankratochvil, alexshap Reviewed By: labath Subscribers: rnkovacs, wuzish, shafik, emaste, mgorny, arichardson, hiraditya, MaskRay, lldb-commits Tags: #lldb, #llvm Differential Revision: https://reviews.llvm.org/D66791 llvm-svn: 373891
* [llvm-readelf/llvm-objdump] - Improve/refactor the implementation of ↵George Rimar2019-10-074-28/+143
| | | | | | | | | | | | | | | | | SHT_LLVM_ADDRSIG section dumping. This patch: * Adds a llvm-readobj/llvm-readelf test file for SHT_LLVM_ADDRSIG sections. (we do not have any) * Enables dumping of SHT_LLVM_ADDRSIG with --all. * Changes the logic to report a warning instead of an error when something goes wrong during dumping (allows to continue dumping SHT_LLVM_ADDRSIG and other sections on error). * Refactors a piece of logic to a new toULEB128Array helper which might be used for GNU-style dumping implementation. Differential revision: https://reviews.llvm.org/D68383 llvm-svn: 373890
* [clangd] Collect missing macro references.Haojian Wu2019-10-072-2/+38
| | | | | | | | | | | | | | Summary: Semantic highlghting is missing a few macro references. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68458 llvm-svn: 373889
* [IA] Recognize hexadecimal escape sequencesBill Wendling2019-10-072-1/+21
| | | | | | | | | | | | | | | | | Summary: Implement support for hexadecimal escape sequences to match how GNU 'as' handles them. I.e., read all hexadecimal characters and truncate to the lower 16 bits. Reviewers: nickdesaulniers Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68483 llvm-svn: 373888
* clang-cl: Ignore the new /ZH optionsHans Wennborg2019-10-072-0/+6
| | | | | | | | | These were added to the MS docs in https://github.com/MicrosoftDocs/cpp-docs/commit/85b9b6967e58e485251450f7451673f6fc873e88 and are supposedly available in VS 2019 16.4 (though my 2019 Preview, version 16.4.0-pre.1.0 don't seem to have them.) llvm-svn: 373887
* [ELF][MIPS] De-template writeValue. NFCFangrui Song2019-10-071-23/+20
| | | | | | Depends on D68561. llvm-svn: 373886
* [ELF] Wrap things in `namespace lld { namespace elf {`, NFCFangrui Song2019-10-0737-341/+439
| | | | | | | | | | | This makes it clear `ELF/**/*.cpp` files define things in the `lld::elf` namespace and simplifies `elf::foo` to `foo`. Reviewed By: atanasyan, grimar, ruiu Differential Revision: https://reviews.llvm.org/D68323 llvm-svn: 373885
* [ELF][MIPS] Use lld::elf::{read,write}* instead of ↵Fangrui Song2019-10-071-70/+68
| | | | | | | | | | | | | | llvm::support::endian::{read,write}* This allows us to delete `using namespace llvm::support::endian` and simplify D68323. This change adds runtime config->endianness check but the overhead should be negligible. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D68561 llvm-svn: 373884
* [TableGen] Pacify gcc-5.4 moreJames Molloy2019-10-071-2/+2
| | | | | | | Followup to a previous pacification, this performs the same workaround to the TableGen generated code for tuple automata. llvm-svn: 373883
* Revert "[SLP] avoid reduction transform on patterns that the backend can ↵Martin Storsjo2019-10-074-179/+55
| | | | | | | | | | load-combine" This reverts SVN r373833, as it caused a failed assert "Non-zero loop cost expected" on building numerous projects, see PR43582 for details and reproduction samples. llvm-svn: 373882
* [llvm-locstats] Fix a typo in the documentation; NFCDjordje Todorovic2019-10-071-1/+1
| | | | llvm-svn: 373880
* [X86] Autogenerate checks in leaFixup32.mir and leaFixup64.mir. NFCCraig Topper2019-10-072-156/+294
| | | | llvm-svn: 373878
* [X86] Support LEA64_32r in processInstrForSlow3OpLEA and use INC/DEC when ↵Craig Topper2019-10-074-95/+125
| | | | | | | | | | | | | | possible. Move the erasing and iterator updating inside to match the other slow LEA function. I've adapted code from optTwoAddrLEA and basically rebuilt the implementation here. We do lose the kill flags now just like optTwoAddrLEA. This runs late enough in the pipeline that shouldn't really be a problem. llvm-svn: 373877
* [NFC][CGP] Tests for making ICMP_EQ use CR result of ICMP_S(L|G)T dominatorsYi-Hong Lyu2019-10-073-232/+1434
| | | | llvm-svn: 373876
* [c++20] Check for a class-specific operator delete when deleting anRichard Smith2019-10-072-0/+38
| | | | | | object of class type with a virtual destructor. llvm-svn: 373875
* Fix behavior of __builtin_bit_cast when the From and To types are theRichard Smith2019-10-074-7/+24
| | | | | | | | | | same. We were missing the lvalue-to-rvalue conversion entirely in this case, and in fact still need the full CK_LValueToRValueBitCast conversion to perform a load with no TBAA. llvm-svn: 373874
* gn build: no-op style tweak in sync scriptNico Weber2019-10-071-1/+0
| | | | llvm-svn: 373873
* [Docs] Removes Subsystem Documentation pageDeForest Richards2019-10-064-177/+171
| | | | | | Removes Subsystem Documentation page. Also moves existing topics on Subsystem Documentation page to User Guides and Reference pages. llvm-svn: 373872
* [X86][AVX] Access a scalar float/double as a free extract from a broadcast ↵Simon Pilgrim2019-10-064-42/+47
| | | | | | | | | | | | | | | | load (PR43217) If a fp scalar is loaded and then used as both a scalar and a vector broadcast, perform the load as a broadcast and then extract the scalar for 'free' from the 0th element. This involved switching the order of the X86ISD::BROADCAST combines so we only convert to X86ISD::BROADCAST_LOAD once all other canonicalizations have been attempted. Adds a DAGCombinerInfo::recursivelyDeleteUnusedNodes wrapper. Fixes PR43217 Differential Revision: https://reviews.llvm.org/D68544 llvm-svn: 373871
* Fix signed/unsigned warning. NFCISimon Pilgrim2019-10-061-1/+1
| | | | llvm-svn: 373870
* [NFC][PowerPC] Reorganize CRNotPat multiclass patterns in PPCInstrInfo.tdAmy Kwan2019-10-061-84/+91
| | | | | | | | | | | | This is patch aims to group together the `CRNotPat` multi class instantiations within the `PPCInstrInfo.td` file. Integer instantiations of the multi class are grouped together into a section, and the floating point patterns are separated into its own section. Differential Revision: https://reviews.llvm.org/D67975 llvm-svn: 373869
* [X86][SSE] Remove resolveTargetShuffleInputs and use getTargetShuffleInputs ↵Simon Pilgrim2019-10-061-42/+22
| | | | | | | | directly. Move the resolveTargetShuffleInputsAndMask call to after the shuffle mask combine before the undef/zero constant fold instead. llvm-svn: 373868
* [X86][SSE] Don't merge known undef/zero elements into target shuffle masks.Simon Pilgrim2019-10-061-30/+50
| | | | | | | | Replaces setTargetShuffleZeroElements with getTargetShuffleAndZeroables which reports the Zeroable elements but doesn't merge them into the decoded target shuffle mask (the merging has been moved up into getTargetShuffleInputs until we can get rid of it entirely). This is part of the work to fix PR43024 and allow us to use SimplifyDemandedElts to simplify shuffle chains - we need to get to a point where the target shuffle mask isn't adjusted by its source inputs but instead we cache them in a parallel Zeroable mask. llvm-svn: 373867
* Implements CWG 1601 in [over.ics.rank/4.2]Richard Smith2019-10-064-6/+65
| | | | | | | | | | | | | | | | | | | Summary: The overload resolution for enums with a fixed underlying type has changed in the C++14 standard. This patch implements the new rule. Patch by Mark de Wever! Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65695 llvm-svn: 373866
* [X86] Add custom type legalization for v16i64->v16i8 truncate and ↵Craig Topper2019-10-065-68/+173
| | | | | | | | | | | | | | | | | | | | | v8i64->v8i8 truncate when v8i64 isn't legal Summary: The default legalization for v16i64->v16i8 tries to create a multiple stage truncate concatenating after each stage and truncating again. But avx512 implements truncates with multiple uops. So it should be better to truncate all the way to the desired element size and then concatenate the pieces using unpckl instructions. This minimizes the number of 2 uop truncates. The unpcks are all single uop instructions. I tried to handle this by just custom splitting the v16i64->v16i8 shuffle. And hoped that the DAG combiner would leave the two halves in the state needed to make D68374 do the job for each half. This worked for the first half, but the second half got messed up. So I've implemented custom handling for v8i64->v8i8 when v8i64 needs to be split to produce the VTRUNCs directly. Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68428 llvm-svn: 373864
* [LegalizeTypes][X86] When splitting a vselect for type legalization, don't ↵Craig Topper2019-10-064-93/+122
| | | | | | | | | | | | | | | | | | split a setcc condition if the setcc input is legal and vXi1 conditions are supported Summary: The VSELECT splitting code tries to split a setcc input as well. But on avx512 where mask registers are well supported it should be better to just split the mask and use a single compare. Reviewers: RKSimon, spatel, efriedma Reviewed By: spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68359 llvm-svn: 373863
* [Sema] Avoids an assertion failure when an invalid conversion declaration is ↵Richard Smith2019-10-062-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | used Summary: When using a user-defined conversion function template with a deduced return type the compiler gives a set of warnings: ``` bug.cc:252:44: error: cannot specify any part of a return type in the declaration of a conversion function; use an alias template to declare a conversion to 'auto (Ts &&...) const' template <typename... Ts> operator auto()(Ts &&... xs) const; ^~~~~~~~~~~~~~~~~~~ bug.cc:252:29: error: conversion function cannot convert to a function type template <typename... Ts> operator auto()(Ts &&... xs) const; ^ error: pointer to function type cannot have 'const' qualifier ``` after which it triggers an assertion failure. It seems the last error is incorrect and doesn't have any location information. This patch stops the compilation after the second warning. Fixes bug 31422. Patch by Mark de Wever! Reviewers: rsmith Reviewed By: rsmith Subscribers: bbannier, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64820 llvm-svn: 373862
* gn build: make windows build less brokenNico Weber2019-10-061-0/+3
| | | | llvm-svn: 373858
* [LOOPGUARD] Remove asserts in getLoopGuardBranchWhitney Tsang2019-10-062-3/+94
| | | | | | | | | | | | | Summary: The assertion in getLoopGuardBranch can be a 'return nullptr' under if condition. Authored By: DTharun Reviewer: Whitney, fhahn Reviewed By: Whitney, fhahn Subscribers: fhahn, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D66084 llvm-svn: 373857
* [Docs] Removes Programming Documentation pageDeForest Richards2019-10-065-60/+48
| | | | | | Removes Programming Documentation page. Also moves existing topics on Programming Documentation page to User Guides and Reference pages. llvm-svn: 373856
* [X86][SSE] resolveTargetShuffleInputs - call getTargetShuffleInputs instead ↵Simon Pilgrim2019-10-061-5/+4
| | | | | | of using setTargetShuffleZeroElements directly. NFCI. llvm-svn: 373855
* [Docs] Adds new Getting Started/Tutorials pageDeForest Richards2019-10-066-155/+160
| | | | | | Adds a new page for Getting Started/Tutorials topics. Also updates existing topic categories on the User Guides and Reference pages. llvm-svn: 373854
* Revert [DAGCombine] Match more patterns for half word bswapSanjay Patel2019-10-062-32/+47
| | | | | | | | This reverts r373850 (git commit 25ba49824d2d4f2347b4a7cb1623600a76ce9433) This patch appears to cause multiple codegen regression test failures - http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/10680 llvm-svn: 373853
* [NFC] Replace 'isDarwin' with 'IsDarwin'Xiangling Liao2019-10-067-38/+38
| | | | | | | | Summary: Replace 'isDarwin' with 'IsDarwin' based on LLVM naming convention. Differential Revision: https://reviews.llvm.org/D68336 llvm-svn: 373852
* [InstCombine] fold fneg disguised as select+fmul (PR43497)Sanjay Patel2019-10-062-30/+65
| | | | | | | Extends rL373230 and solves the motivating bug (although in a narrow way): https://bugs.llvm.org/show_bug.cgi?id=43497 llvm-svn: 373851
* [DAGCombine] Match more patterns for half word bswapAmaury Sechet2019-10-062-47/+32
| | | | | | | | | | | | | | Summary: It ensures that the bswap is generated even when a part of the subtree already matches a bswap transform. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68250 llvm-svn: 373850
OpenPOWER on IntegriCloud