aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-01-28Merging r352221 and r352222:Hans Wennborg12-49/+84
------------------------------------------------------------------------ r352221 | erichkeane | 2019-01-25 18:27:57 +0100 (Fri, 25 Jan 2019) | 12 lines Disable _Float16 for non ARM/SPIR Targets As Discussed here: http://lists.llvm.org/pipermail/llvm-dev/2019-January/129543.html There are problems exposing the _Float16 type on architectures that haven't defined the ABI/ISel for the type yet, so we're temporarily disabling the type and making it opt-in. Differential Revision: https://reviews.llvm.org/D57188 Change-Id: I5db7366dedf1deb9485adb8948b1deb7e612a736 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r352222 | erichkeane | 2019-01-25 18:39:57 +0100 (Fri, 25 Jan 2019) | 3 lines Fix incorrect indent from r352221 Change-Id: I0a7b1443eb6912ef7bea1a4cf2f696fc01726557 ------------------------------------------------------------------------ llvm-svn: 352363
2019-01-28Merging r352105:Hans Wennborg3-9/+40
Redirecting to URL 'https://llvm.org/svn/llvm-project/cfe/trunk': ------------------------------------------------------------------------ r352105 | djg | 2019-01-24 22:05:11 +0100 (Thu, 24 Jan 2019) | 7 lines [WebAssembly] Add a __wasi__ target macro This adds a `__wasi__` macro for the wasi OS, similar to `__linux__` etc. for other OS's. Differential Revision: https://reviews.llvm.org/D57155 ------------------------------------------------------------------------ llvm-svn: 352360
2019-01-28Merging r352099:Hans Wennborg1-633/+342
Redirecting to URL 'https://llvm.org/svn/llvm-project/cfe/trunk': ------------------------------------------------------------------------ r352099 | djg | 2019-01-24 21:31:11 +0100 (Thu, 24 Jan 2019) | 7 lines [WebAssembly] Factor commonality between wasm32 and wasm64 in test/Preprocessor/init.c Use the -check-prefixes= feature to merge most of the WEBASSEMBLY32 and WEBASSEMBLY64 test checks into a shared WEBASSEMBLY test check. Differential Revision: https://reviews.llvm.org/D57153 ------------------------------------------------------------------------ llvm-svn: 352359
2019-01-28Merging r352323:Hans Wennborg2-0/+21
Redirecting to URL 'https://llvm.org/svn/llvm-project/cfe/trunk': ------------------------------------------------------------------------ r352323 | rakete1111 | 2019-01-27 20:19:59 +0100 (Sun, 27 Jan 2019) | 31 lines [SemaCXX] Fix ICE with structure bindings to members of template Summary: Trying to use structure binding with a structure that doesn't implement std::tuple_size, should unpack the data members. When the struct is a template though, clang might hit an assertion (if the type has not been completed before), because CXXRecordDecl::DefinitionData is nullptr. This commit fixes the problem by completing the type while trying to decompose the structured binding. The ICE happens in real world code, for example, when trying to iterate a protobuf generated map with a range-based for loop and structure bindings (because google::protobuf::MapPair is a template and doesn't support std::tuple_size). Reported-by: nicholas.sun@nlsun.com Patch by Daniele Di Proietto Reviewers: #clang, rsmith Reviewed By: #clang, rsmith Subscribers: cpplearner, Rakete1111, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D56974 ------------------------------------------------------------------------ llvm-svn: 352356
2019-01-28Merging r352302:Hans Wennborg3-2/+49
Redirecting to URL 'https://llvm.org/svn/llvm-project/lld/trunk': ------------------------------------------------------------------------ r352302 | nickdesaulniers | 2019-01-27 03:54:23 +0100 (Sun, 27 Jan 2019) | 33 lines lld: elf: discard more specific .gnu.linkonce section Summary: lld discards .gnu.linonce.* sections work around a bug in glibc. https://sourceware.org/bugzilla/show_bug.cgi?id=20543 Unfortunately, the Linux kernel uses a section named .gnu.linkonce.this_module to store infomation about kernel modules. The kernel reads data from this section when loading kernel modules, and errors if it fails to find this section. The current behavior of lld discards this section when kernel modules are linked, so kernel modules linked with lld are unloadable by the linux kernel. The Linux kernel should use a comdat section instead of .gnu.linkonce. The minimum version of binutils supported by the kernel supports comdat sections. The kernel is also not relying on the old linkonce behavior; it seems to have chosen a name that contains a deprecated GNU feature. Changing the section name now in the kernel would require all kernel modules to be recompiled to make use of the new section name. Instead, rather than discarding .gnu.linkonce.*, let's discard the more specific section name to continue working around the glibc issue while supporting linking Linux kernel modules. Link: https://github.com/ClangBuiltLinux/linux/issues/329 Reviewers: pcc, espindola Reviewed By: pcc Subscribers: nathanchance, emaste, arichardson, void, srhines Differential Revision: https://reviews.llvm.org/D57294 ------------------------------------------------------------------------ llvm-svn: 352355
2019-01-28Remove failing test expectations.Hans Wennborg1-6/+0
See discussions on the cfe-commits & clangd-dev thread about r352079. llvm-svn: 352354
2019-01-28Merging r352257:Hans Wennborg1-1/+0
Redirecting to URL 'https://llvm.org/svn/llvm-project/lld/trunk': ------------------------------------------------------------------------ r352257 | ruiu | 2019-01-26 01:31:49 +0100 (Sat, 26 Jan 2019) | 1 line Remove dead declaration. ------------------------------------------------------------------------ llvm-svn: 352352
2019-01-25Merging r352234:Hans Wennborg2-1/+3
------------------------------------------------------------------------ r352234 | dim | 2019-01-25 20:36:47 +0100 (Fri, 25 Jan 2019) | 38 lines Fix XRayTest link on FreeBSD (and likely NetBSD too) Summary: As reported on llvm-testers, during 8.0.0-rc1 testing I got errors while building of `XRayTest`, during `check-all`: ``` [100%] Generating XRayTest-x86_64-Test /home/dim/llvm/8.0.0/rc1/Phase3/Release/llvmCore-8.0.0-rc1.obj/./lib/libLLVMSupport.a(Signals.cpp.o): In function `llvm::sys::PrintStackTrace(llvm::raw_ostream&)': Signals.cpp:(.text._ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x24): undefined reference to `backtrace' Signals.cpp:(.text._ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x254): undefined reference to `llvm::itaniumDemangle(char const*, char*, unsigned long*, int*)' clang-8: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/build.make:73: projects/compiler-rt/lib/xray/tests/unit/XRayTest-x86_64-Test] Error 1 gmake[3]: Target 'projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/build' not remade because of errors. gmake[2]: *** [CMakeFiles/Makefile2:33513: projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/all] Error 2 gmake[2]: Target 'CMakeFiles/check-all.dir/all' not remade because of errors. gmake[1]: *** [CMakeFiles/Makefile2:737: CMakeFiles/check-all.dir/rule] Error 2 gmake[1]: Target 'check-all' not remade because of errors. gmake: *** [Makefile:277: check-all] Error 2 [Release Phase3] check-all failed ``` This is because the `backtrace` function requires `-lexecinfo` on BSD platforms. To fix this, detect the `execinfo` library in `cmake/config-ix.cmake`, and add it to the unit test link flags. Additionally, since the code in `sys::PrintStackTrace` makes use of `itaniumDemangle`, also add `-lLLVMDemangle`. (Note that this is more of a general problem with libLLVMSupport, but I'm looking for a quick fix now so it can be merged to the 8.0 branch.) Reviewers: dberris, hans, mgorny, samsonov Reviewed By: dberris Subscribers: krytarowski, delcypher, erik.pilkington, #sanitizers, emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D57181 ------------------------------------------------------------------------ llvm-svn: 352251
2019-01-25Merging r352204:Hans Wennborg2-0/+7
------------------------------------------------------------------------ r352204 | sammccall | 2019-01-25 16:05:33 +0100 (Fri, 25 Jan 2019) | 7 lines [JSON] Work around excess-precision issue when comparing T_Integer numbers. Reviewers: bkramer Subscribers: kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D57237 ------------------------------------------------------------------------ llvm-svn: 352233
2019-01-25Merging r352079:Hans Wennborg4-54/+42
------------------------------------------------------------------------ r352079 | sammccall | 2019-01-24 19:55:24 +0100 (Thu, 24 Jan 2019) | 33 lines [FileManager] Revert r347205 to avoid PCH file-descriptor leak. Summary: r347205 fixed a bug in FileManager: first calling getFile(shouldOpen=false) and then getFile(shouldOpen=true) results in the file not being open. Unfortunately, some code was (inadvertently?) relying on this bug: when building with a PCH, the file entries are obtained first by passing shouldOpen=false, and then later shouldOpen=true, without any intention of reading them. After r347205, they do get unneccesarily opened. Aside from extra operations, this means they need to be closed. Normally files are closed when their contents are read. As these files are never read, they stay open until clang exits. On platforms with a low open-files limit (e.g. Mac), this can lead to spurious file-not-found errors when building large projects with PCH enabled, e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=924225 Fixing the callsites to pass shouldOpen=false when the file won't be read is not quite trivial (that info isn't available at the direct callsite), and passing shouldOpen=false is a performance regression (it results in open+fstat pairs being replaced by stat+open). So an ideal fix is going to be a little risky and we need some fix soon (especially for the llvm 8 branch). The problem addressed by r347205 is rare and has only been observed in clangd. It was present in llvm-7, so we can live with it for now. Reviewers: bkramer, thakis Subscribers: ilya-biryukov, ioeric, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D57165 ------------------------------------------------------------------------ llvm-svn: 352225
2019-01-25Merging r352068:Hans Wennborg2-22/+74
------------------------------------------------------------------------ r352068 | serge_sans_paille | 2019-01-24 18:56:08 +0100 (Thu, 24 Jan 2019) | 7 lines Partial support of SHT_GROUP without flag This does *not* implement full SHT_GROUP semantic, yet it is a simple step forward: Sections within a group are still considered valid, but they do not behave as specified by the standard in case of garbage collection. Differential Revision: https://reviews.llvm.org/D56437 ------------------------------------------------------------------------ llvm-svn: 352218
2019-01-25Merging r352034:Hans Wennborg3-10/+35
------------------------------------------------------------------------ r352034 | atanasyan | 2019-01-24 10:13:14 +0100 (Thu, 24 Jan 2019) | 18 lines Reapply: [mips] Handle MipsMCExpr sub-expression for the MEK_DTPREL tag This reapplies commit r351987 with a failed test fix. Now the test accepts both DW_OP_GNU_push_tls_address and DW_OP_form_tls_address opcode. Original commit message: ``` This is a fix for a regression introduced by the rL348194 commit. In that change new type (MEK_DTPREL) of MipsMCExpr expression was added, but in some places of the code this type of expression considered as unexpected. This change fixes the bug. The MEK_DTPREL type of expression is used for marking TLS DIEExpr only and contains a regular sub-expression. Where we need to handle the expression, we retrieve the sub-expression and handle it in a common way. ``` ------------------------------------------------------------------------ llvm-svn: 352140
2019-01-25Merging r351579:Hans Wennborg3-0/+28
------------------------------------------------------------------------ r351579 | vstefanovic | 2019-01-18 20:54:51 +0100 (Fri, 18 Jan 2019) | 9 lines [mips] Add '-mrelax-pic-calls', '-mno-relax-pic-calls' These two options enable/disable emission of R_{MICRO}MIPS_JALR fixups along with PIC calls. The linker may then try to turn PIC calls into direct jumps. By default, these fixups do get emitted by the backend, use '-mno-relax-pic-calls' to omit them. Differential revision: https://reviews.llvm.org/D56878 ------------------------------------------------------------------------ llvm-svn: 352139
2019-01-25Merging r351485:Hans Wennborg26-108/+408
------------------------------------------------------------------------ r351485 | vstefanovic | 2019-01-17 22:50:37 +0100 (Thu, 17 Jan 2019) | 10 lines [mips] Emit .reloc R_{MICRO}MIPS_JALR along with j(al)r(c) $25 The callee address is added as an optional operand (MCSymbol) in AdjustInstrPostInstrSelection() and then used by asm printer to insert: '.reloc tmplabel, R_MIPS_JALR, symbol tmplabel:'. Controlled with '-mips-jalr-reloc', default is true. Differential revision: https://reviews.llvm.org/D56694 ------------------------------------------------------------------------ llvm-svn: 352137
2019-01-25Merging r352082:Hans Wennborg2-1/+28
------------------------------------------------------------------------ r352082 | ruiu | 2019-01-24 20:02:31 +0100 (Thu, 24 Jan 2019) | 15 lines Fix broken export table if .rdata is merged with .text. Previously, we assumed that .rdata is zero-filled, so when writing an COFF import table, we didn't write anything if the data is zero. That assumption was wrong because .rdata can be merged with .text. If .rdata is merged with .text, they are initialized with 0xcc which is a trap instruction. This patch removes that assumption from code. Should be merged to 8.0 branch as this is a regression. Fixes https://bugs.llvm.org/show_bug.cgi?id=39826 Differential Revision: https://reviews.llvm.org/D57168 ------------------------------------------------------------------------ llvm-svn: 352135
2019-01-25Merging r352116:Hans Wennborg1-0/+1
------------------------------------------------------------------------ r352116 | mgorny | 2019-01-24 23:20:47 +0100 (Thu, 24 Jan 2019) | 9 lines [Process/NetBSD] Add missing linkage to -lutil Add missing linkage to fix build failure with LLD: ld: error: undefined symbol: kinfo_getvmmap >>> referenced by NativeProcessNetBSD.cpp >>> NativeProcessNetBSD.cpp.o:(lldb_private::process_netbsd::NativeProcessNetBSD::PopulateMemoryRegionCache()) in archive lib/liblldbPluginProcessNetBSD.a Differential Revision: https://reviews.llvm.org/D57193 ------------------------------------------------------------------------ llvm-svn: 352134
2019-01-24Merging r352102:Hans Wennborg1-1/+1
------------------------------------------------------------------------ r352102 | rsmith | 2019-01-24 21:52:56 +0100 (Thu, 24 Jan 2019) | 2 lines Add a triple to this test so it passes for targets where alignof(double) really should be equal to alignof(float). ------------------------------------------------------------------------ llvm-svn: 352132
2019-01-24Merging r352040:Hans Wennborg2-1/+14
------------------------------------------------------------------------ r352040 | ibiryukov | 2019-01-24 11:41:43 +0100 (Thu, 24 Jan 2019) | 9 lines [CodeComplete] [clangd] Fix crash on ValueDecl with a null type Reviewers: kadircet Reviewed By: kadircet Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D57093 ------------------------------------------------------------------------ llvm-svn: 352120
2019-01-24Merging r352040:Hans Wennborg2-1/+10
------------------------------------------------------------------------ r352040 | ibiryukov | 2019-01-24 11:41:43 +0100 (Thu, 24 Jan 2019) | 9 lines [CodeComplete] [clangd] Fix crash on ValueDecl with a null type Reviewers: kadircet Reviewed By: kadircet Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D57093 ------------------------------------------------------------------------ llvm-svn: 352118
2019-01-24Merging r351930 and r351932:Hans Wennborg4-104/+258
------------------------------------------------------------------------ r351930 | kbeyls | 2019-01-23 09:18:39 +0100 (Wed, 23 Jan 2019) | 30 lines [SLH] AArch64: correctly pick temporary register to mask SP As part of speculation hardening, the stack pointer gets masked with the taint register (X16) before a function call or before a function return. Since there are no instructions that can directly mask writing to the stack pointer, the stack pointer must first be transferred to another register, where it can be masked, before that value is transferred back to the stack pointer. Before, that temporary register was always picked to be x17, since the ABI allows clobbering x17 on any function call, resulting in the following instruction pattern being inserted before function calls and returns/tail calls: mov x17, sp and x17, x17, x16 mov sp, x17 However, x17 can be live in those locations, for example when the call is an indirect call, using x17 as the target address (blr x17). To fix this, this patch looks for an available register just before the call or terminator instruction and uses that. In the rare case when no register turns out to be available (this situation is only encountered twice across the whole test-suite), just insert a full speculation barrier at the start of the basic block where this occurs. Differential Revision: https://reviews.llvm.org/D56717 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r351932 | kbeyls | 2019-01-23 10:10:12 +0100 (Wed, 23 Jan 2019) | 3 lines [SLH][AArch64] Remove accidentally retained -debug-only line from test. ------------------------------------------------------------------------ llvm-svn: 352115
2019-01-23Merging r351670:llvmorg-8.0.0-rc1Hans Wennborg8-24/+40
------------------------------------------------------------------------ r351670 | ericwf | 2019-01-20 02:21:35 +0100 (Sun, 20 Jan 2019) | 7 lines Fix aligned allocation availability XFAILs after D56445. D56445 bumped the minimum Mac OS X version required for aligned allocation from 10.13 to 10.14. This caused libc++ tests depending on the old value to break. This patch updates the XFAILs for those tests to include 10.13. ------------------------------------------------------------------------ llvm-svn: 351980
2019-01-23Merging r351899:Hans Wennborg2-20/+25
------------------------------------------------------------------------ r351899 | pcc | 2019-01-23 00:54:49 +0100 (Wed, 23 Jan 2019) | 26 lines COFF, ELF: ICF: Perform 2 rounds of relocation hash propagation. LLD's performance on PGO instrumented Windows binaries was still not great even with the fix in D56955; out of the 2m41s linker runtime, around 2 minutes were still being spent in ICF. I looked into this more closely and discovered that the vast majority of the runtime was being spent segregating .pdata sections with the following relocation chain: .pdata -> identical .text -> unique PGO counter (not eligible for ICF) This patch causes us to perform 2 rounds of relocation hash propagation, which allows the hash for the .pdata sections to incorporate the identifier from the PGO counter. With that, the amount of time spent in ICF was reduced to about 2 seconds. I also found that the same change led to a significant ICF performance improvement in a regular release build of Chromium's chrome_child.dll, where ICF time was reduced from around 1s to around 700ms. With the same change applied to the ELF linker, median of 100 runs for lld-speed-test/chrome reduced from 4.53s to 4.45s on my machine. I also experimented with increasing the number of propagation rounds further, but I did not observe any further significant performance improvements linking Chromium or Firefox. Differential Revision: https://reviews.llvm.org/D56986 ------------------------------------------------------------------------ llvm-svn: 351964
2019-01-23Merging r351898:Hans Wennborg2-2/+2
------------------------------------------------------------------------ r351898 | pcc | 2019-01-23 00:51:35 +0100 (Wed, 23 Jan 2019) | 13 lines COFF, ELF: Adjust ICF hash computation to account for self relocations. It turns out that sections in PGO instrumented object files on Windows contain a large number of relocations pointing to themselves. With r347429 this can cause many sections to receive the same hash (usually zero) as a result of a section's hash being xor'ed with itself. This patch causes the COFF and ELF linkers to avoid this problem by adding the hash of the relocated section instead of xor'ing it. On my machine this causes the regressing test case provided by Mozilla to terminate in 2m41s. Differential Revision: https://reviews.llvm.org/D56955 ------------------------------------------------------------------------ llvm-svn: 351963
2019-01-23Merging r351738:Hans Wennborg1-17/+1
------------------------------------------------------------------------ r351738 | kadircet | 2019-01-21 11:10:18 +0100 (Mon, 21 Jan 2019) | 9 lines [clang-tidy] Use getStripPluginsAdjuster Summary: See rC351531 for the introduction of getStripPluginsAdjuster. Reviewers: alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D56902 ------------------------------------------------------------------------ llvm-svn: 351962
2019-01-23Merging r351531:Hans Wennborg3-0/+57
------------------------------------------------------------------------ r351531 | kadircet | 2019-01-18 10:00:31 +0100 (Fri, 18 Jan 2019) | 11 lines [tooling] Add a new argument adjuster for deleting plugin related command line args Summary: Currently both clangd and clang-tidy makes use of this mechanism so putting it into tooling so that all tools can make use of it. Reviewers: ilya-biryukov, sammccall Subscribers: ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D56856 ------------------------------------------------------------------------ llvm-svn: 351961
2019-01-22[docs] Add release notes for notable things I've contributed since last releaseMartin Storsjo1-0/+12
Differential Revision: https://reviews.llvm.org/D57004 llvm-svn: 351872
2019-01-22[docs] Add release notes for notable things I've contributed since last releaseMartin Storsjo1-0/+11
Differential Revision: https://reviews.llvm.org/D57003 llvm-svn: 351870
2019-01-22[docs] Amend the release notes with more things I've contributed since the ↵Martin Storsjo1-0/+7
last release Differential Revision: https://reviews.llvm.org/D57005 llvm-svn: 351868
2019-01-22Merging r351788:Hans Wennborg9-42/+86
------------------------------------------------------------------------ r351788 | kadircet | 2019-01-22 10:10:20 +0100 (Tue, 22 Jan 2019) | 15 lines [clangd] Filter out plugin related flags and move all commandline manipulations into OverlayCDB. Summary: Some projects make use of clang plugins when building, but clangd is not aware of those plugins therefore can't work with the same compile command arguments. There were multiple places clangd performed commandline manipulations, this one also moves them all into OverlayCDB. Reviewers: ilya-biryukov Subscribers: klimek, sammccall, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56841 ------------------------------------------------------------------------ llvm-svn: 351860
2019-01-22Merging r351754:Hans Wennborg1-0/+419
------------------------------------------------------------------------ r351754 | spatel | 2019-01-21 18:46:35 +0100 (Mon, 21 Jan 2019) | 6 lines [AArch64] add more tests for buildvec to shuffle transform; NFC These are copied from the sibling x86 file. I'm not sure which of the current outputs (if any) is considered optimal, but someone more familiar with AArch may want to take a look. ------------------------------------------------------------------------ llvm-svn: 351858
2019-01-22Merging r351753:Hans Wennborg2-5/+33
------------------------------------------------------------------------ r351753 | spatel | 2019-01-21 18:30:14 +0100 (Mon, 21 Jan 2019) | 8 lines [DAGCombiner] fix crash when converting build vector to shuffle The regression test is reduced from the example shown in D56281. This does raise a question as noted in the test file: do we want to handle this pattern? I don't have a motivating example for that on x86 yet, but it seems like we could have that pattern there too, so we could avoid the back-and-forth using a shuffle. ------------------------------------------------------------------------ llvm-svn: 351857
2019-01-22Merging r351686:Hans Wennborg3-10/+28
------------------------------------------------------------------------ r351686 | vmiklos | 2019-01-20 15:28:27 +0100 (Sun, 20 Jan 2019) | 5 lines [clang-tidy] misc-non-private-member-variables-in-classes: ignore implicit methods Otherwise we don't warn on a struct containing a single public int, but we warn on a struct containing a single public std::string, which is inconsistent. ------------------------------------------------------------------------ llvm-svn: 351844
2019-01-22Merging r351580:Hans Wennborg2-48/+50
------------------------------------------------------------------------ r351580 | kli | 2019-01-18 20:57:37 +0100 (Fri, 18 Jan 2019) | 4 lines [OPENMP][DOCS] Release notes/OpenMP support updates, NFC. Differential Revision: https://reviews.llvm.org/D56733 ------------------------------------------------------------------------ llvm-svn: 351839
2019-01-18Merging r351426:Hans Wennborg1-1/+0
------------------------------------------------------------------------ r351426 | d0k | 2019-01-17 11:25:18 +0100 (Thu, 17 Jan 2019) | 1 line [MC] Remove unused variable ------------------------------------------------------------------------ llvm-svn: 351543
2019-01-18Merging r351463, r351466, r351467, and r351468Hans Wennborg3-508/+631
------------------------------------------------------------------------ r351463 | eugenezelenko | 2019-01-17 19:31:34 +0100 (Thu, 17 Jan 2019) | 6 lines [Documentation] Add a chapter about Clang-tidy integrations. Patch by Marina Kalashina. Differential Revision: https://reviews.llvm.org/D54945 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r351466 | eugenezelenko | 2019-01-17 20:35:39 +0100 (Thu, 17 Jan 2019) | 2 lines [Documentation] Fix link in docs/clang-tidy/Contributing.rst. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r351467 | eugenezelenko | 2019-01-17 20:47:44 +0100 (Thu, 17 Jan 2019) | 2 lines [Documentation] Another attempt to fix link in docs/clang-tidy/Contributing.rst. Use HTTPS for links. ------------------------------------------------------------------------ ------------------------------------------------------------------------ r351468 | eugenezelenko | 2019-01-17 21:00:23 +0100 (Thu, 17 Jan 2019) | 2 lines [Documentation] Fix another link in docs/clang-tidy/Contributing.rst. ------------------------------------------------------------------------ llvm-svn: 351538
2019-01-18Merging r351504:Hans Wennborg2-6/+8
------------------------------------------------------------------------ r351504 | brad | 2019-01-18 02:36:58 +0100 (Fri, 18 Jan 2019) | 2 lines Use llvm::VersionTuple instead of manual version marshalling ------------------------------------------------------------------------ llvm-svn: 351536
2019-01-18Merging r351459:Hans Wennborg3-9/+25
------------------------------------------------------------------------ r351459 | arphaman | 2019-01-17 19:12:45 +0100 (Thu, 17 Jan 2019) | 13 lines [ObjC] Follow-up r350768 and allow the use of unavailable methods that are declared in a parent class from within the @implementation context This commit extends r350768 and allows the use of methods marked as unavailable that are declared in a parent class/category from within the @implementation of the class where the method is marked as unavailable. This allows users to call init that's marked as unavailable even if they don't define it. rdar://47134898 Differential Revision: https://reviews.llvm.org/D56816 ------------------------------------------------------------------------ llvm-svn: 351535
2019-01-18Merging r351457:Hans Wennborg3-5/+24
------------------------------------------------------------------------ r351457 | vlad.tsyrklevich | 2019-01-17 18:53:45 +0100 (Thu, 17 Jan 2019) | 15 lines TLS: Respect visibility for thread_local variables on Darwin (PR40327) Summary: Teach clang to mark thread wrappers for thread_local variables with hidden visibility when the original variable is marked with hidden visibility. This is necessary on Darwin which exposes the thread wrapper instead of the thread variable. The thread wrapper would previously always be created with default visibility unless it had linkonce*/weak_odr linkage. Reviewers: rjmccall Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D56818 ------------------------------------------------------------------------ llvm-svn: 351533
2019-01-18Merging r351325:Hans Wennborg2-1/+53
------------------------------------------------------------------------ r351325 | gbuella | 2019-01-16 13:06:17 +0100 (Wed, 16 Jan 2019) | 26 lines Assertion in isAllocaPromotable due to extra bitcast goes into lifetime marker For the given test SROA detects possible replacement and creates a correct alloca. After that SROA is adding lifetime markers for this new alloca. The function getNewAllocaSlicePtr is trying to deduce the pointer type based on the original alloca, which is split, to use it later in lifetime intrinsic. For the test we ended up with such code (rA is initial alloca [10 x float], which is split, and rA.sroa.0.0 is a new split allocation) ``` %rA.sroa.0.0.rA.sroa_cast = bitcast i32* %rA.sroa.0 to [10 x float]* <----- this one causing the assertion and is an extra bitcast %5 = bitcast [10 x float]* %rA.sroa.0.0.rA.sroa_cast to i8* call void @llvm.lifetime.start.p0i8(i64 4, i8* %5) ``` isAllocaPromotable code assumes that a user of alloca may go into lifetime marker through bitcast but it must be the only one bitcast to i8* type. In the test it's not a i8* type, return false and throw the assertion. As we are creating a pointer, which will be used in lifetime markers only, the proposed fix is to create a bitcast to i8* immediately to avoid extra bitcast creation. The test is a greatly simplified to just reproduce the assertion. Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com> Reviewers: chandlerc, craig.topper Reviewed By: chandlerc Differential Revision: https://reviews.llvm.org/D55934 ------------------------------------------------------------------------ llvm-svn: 351532
2019-01-18Merging r351475:Hans Wennborg2-3/+57
------------------------------------------------------------------------ r351475 | rnk | 2019-01-17 21:46:53 +0100 (Thu, 17 Jan 2019) | 16 lines [InstCombine] Don't sink dynamic allocas Summary: InstCombine's sinking algorithm only thinks about memory. It doesn't think about non-memory constraints like stack object lifetime. It can sink dynamic allocas across a stacksave call, which may be used with stackrestore, which can incorrectly reduce the lifetime of the dynamic alloca. Fixes PR40365 Reviewers: hfinkel, efriedma Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D56872 ------------------------------------------------------------------------ llvm-svn: 351530
2019-01-17Merging r351421:Hans Wennborg3-5/+279
------------------------------------------------------------------------ r351421 | ssijaric | 2019-01-17 10:45:17 +0100 (Thu, 17 Jan 2019) | 12 lines [ARM64][Windows] Share unwind codes between epilogues There are cases where we have multiple epilogues that have the exact same unwind code sequence. In that case, the epilogues can share the same unwind codes in the .xdata section. This should get us past the assert "SEH unwind data splitting not yet implemented" in many cases. We still need to add support for generating multiple .pdata/.xdata sections for those functions that need to be split into fragments. Differential Revision: https://reviews.llvm.org/D56813 ------------------------------------------------------------------------ llvm-svn: 351452
2019-01-17Merging r351370:Hans Wennborg10-9/+191
------------------------------------------------------------------------ r351370 | mgrang | 2019-01-16 20:52:59 +0100 (Wed, 16 Jan 2019) | 14 lines [COFF, ARM64] Implement support for SEH extensions __try/__except/__finally Summary: This patch supports MS SEH extensions __try/__except/__finally. The intrinsics localescape and localrecover are responsible for communicating escaped static allocas from the try block to the handler. We need to preserve frame pointers for SEH. So we create a new function/property HasLocalEscape. Reviewers: rnk, compnerd, mstorsjo, TomTan, efriedma, ssijaric Reviewed By: rnk, efriedma Subscribers: smeenai, jrmuizel, alex, majnemer, ssijaric, ehsan, dmajor, kristina, javed.absar, kristof.beyls, chrib, llvm-commits Differential Revision: https://reviews.llvm.org/D53540 ------------------------------------------------------------------------ llvm-svn: 351451
2019-01-17Merging r351335:Hans Wennborg2-1/+45
------------------------------------------------------------------------ r351335 | psmith | 2019-01-16 14:24:02 +0100 (Wed, 16 Jan 2019) | 17 lines [ELF][AArch64] Add R_AARCH64_PLT_PAGE_PC to isRelExpr As a follow on to D56666 (r351186) there is a case when taking the address of an ifunc when linking -pie that can generate a spurious can't create dynamic relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol in readonly segment. Specifically the case is where the ifunc is in the same translation unit as the address taker, so given -fpie the compiler knows the ifunc is defined in the executable so it can use a non-got-generating relocation. The error message is due to R_AARCH64_PLT_PAGE_PC not being added to isRelExpr, its non PLT equivalent R_AARCH64_PAGE_PC is already in isRelExpr. Differential Revision: https://reviews.llvm.org/D56724 ------------------------------------------------------------------------ llvm-svn: 351446
2019-01-17Merging r351326:Hans Wennborg6-5/+99
------------------------------------------------------------------------ r351326 | psmith | 2019-01-16 13:09:13 +0100 (Wed, 16 Jan 2019) | 15 lines [ELF] Implement option to force PIC compatible Thunks By default LLD will generate position independent Thunks when the --pie or --shared option is used. Reference to absolute addresses is permitted in other cases. For some embedded systems position independent thunks are needed for code that executes before the MMU has been set up. The option --pic-veneer is used by ld.bfd to force position independent thunks. The patch adds --pic-veneer as the option is needed for the Linux kernel on Arm. fixes pr39886 Differential Revision: https://reviews.llvm.org/D55505 ------------------------------------------------------------------------ llvm-svn: 351445
2019-01-17Merging r351381:Hans Wennborg10-164/+347
------------------------------------------------------------------------ r351381 | ctopper | 2019-01-16 22:46:32 +0100 (Wed, 16 Jan 2019) | 11 lines [X86] Add X86ISD::VSHLV and X86ISD::VSRLV nodes for psllv and psrlv Previously we used ISD::SHL and ISD::SRL to represent these in SelectionDAG. ISD::SHL/SRL interpret an out of range shift amount as undefined behavior and will constant fold to undef. While the intrinsics are defined to return 0 for out of range shift amounts. A previous patch added a special node for VPSRAV to produce all sign bits. This was previously believed safe because undefs frequently get turned into 0 either from the constant pool or a desire to not have a false register dependency. But undef is treated specially in some optimizations. For example, its ignored in detection of vector splats. So if the ISD::SHL/SRL can be constant folded and all of the elements with in bounds shift amounts are the same, we might fold it to single element broadcast from the constant pool. This would not put 0s in the elements with out of bounds shift amounts. We do have an existing InstCombine optimization to use shl/lshr when the shift amounts are all constant and in bounds. That should prevent some loss of constant folding from this change. Patch by zhutianyang and Craig Topper Differential Revision: https://reviews.llvm.org/D56695 ------------------------------------------------------------------------ llvm-svn: 351444
2019-01-17Merging r351351:Hans Wennborg15-11/+278
------------------------------------------------------------------------ r351351 | mareko | 2019-01-16 16:43:53 +0100 (Wed, 16 Jan 2019) | 7 lines AMDGPU: Add llvm.amdgcn.ds.ordered.add & swap Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D52944 ------------------------------------------------------------------------ llvm-svn: 351443
2019-01-17Merging r351345:Hans Wennborg4-1/+41
------------------------------------------------------------------------ r351345 | asl | 2019-01-16 15:03:41 +0100 (Wed, 16 Jan 2019) | 23 lines [MSP430] Emit a separate section for every interrupt vector This is LLVM part of D56663 Linker scripts shipped by TI require to have every interrupt vector in a separate section with a specific name: SECTIONS { __interrupt_vector_XX : { KEEP (*(__interrupt_vector_XX )) } > VECTXX ... } Follow the requirement emit the section for every vector which contain address of interrupt handler: .section __interrupt_vector_XX,"ax",@progbits .word %isr% Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56664 ------------------------------------------------------------------------ llvm-svn: 351442
2019-01-17Merging r351344:Hans Wennborg5-18/+56
------------------------------------------------------------------------ r351344 | asl | 2019-01-16 14:44:01 +0100 (Wed, 16 Jan 2019) | 10 lines [MSP430] Improve support of 'interrupt' attribute * Accept as an argument constants in range 0..63 (aligned with TI headers and linker scripts provided with TI GCC toolchain). * Emit function attribute 'interrupt'='xx' instead of aliases (used in the backend to create a section for particular interrupt vector). * Add more diagnostics. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56663 ------------------------------------------------------------------------ llvm-svn: 351441
2019-01-17Merging r351349:Hans Wennborg3-99/+188
------------------------------------------------------------------------ r351349 | abataev | 2019-01-16 16:39:52 +0100 (Wed, 16 Jan 2019) | 14 lines [SLP] Fix PR40310: The reduction nodes should stay scalar. Summary: Sometimes the SLP vectorizer tries to vectorize the horizontal reduction nodes during regular vectorization. This may happen inside of the loops, when there are some vectorizable PHIs. Patch fixes this by checking if the node is the reduction node and thus it must not be vectorized, it must be gathered. Reviewers: RKSimon, spatel, hfinkel, fedor.sergeev Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56783 ------------------------------------------------------------------------ llvm-svn: 351440
2019-01-17Merging r351436:Hans Wennborg1-5/+13
------------------------------------------------------------------------ r351436 | hans | 2019-01-17 14:11:15 +0100 (Thu, 17 Jan 2019) | 1 line build_llvm_package.bat: Run more tests ------------------------------------------------------------------------ llvm-svn: 351437