- Aug 26, 2019
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r366573 | nico | 2019-07-19 15:29:10 +0200 (Fri, 19 Jul 2019) | 6 lines lld-link: Demangle symbols from archives in diagnostics Also add test coverage for thin archives (which are the only way I could come up with to test at least some of the diagnostic changes). Differential Revision: https://reviews.llvm.org/D64927 ------------------------------------------------------------------------ llvm-svn: 369881
-
Hans Wennborg authored
------------------------------------------------------------------------ r369349 | ibiryukov | 2019-08-20 10:54:30 +0200 (Tue, 20 Aug 2019) | 36 lines [clangd] Skip function bodies inside processed files while indexing Summary: This significantly improves performance of background indexing. We do not collect references and declarations inside the processed files, so this does not affect the final indexing results. The idea is borrowed from libclang, which has a similar optimization in its indexing functionality. Measurements show a nice decrease in indexing time, up to ~40% for building the whole index. These are not proper benchmarks, so one should not rely on these results too much. 1. Rebuilding the whole index for LLVM: - Before. Total time: 14m58s. ./bin/clangd -pch-storage=memory < ./clangd.input 23917.67s user 515.86s system 2718% cpu 14:58.68 total - After. Total time: 8m41s. ./bin/clangd -pch-storage=memory < ./clangd.input 13627.29s user 288.10s system 2672% cpu 8:40.67 total 2. Rebuilding index after removing shards matching '*clangd*' (case-insensitively): - Before. Total time: 30s. ./bin/clangd -pch-storage=memory < ./clangd.input 130.94s user 6.82s system 452% cpu 30.423 total - After. Total time: 26s. ./bin/clangd -pch-storage=memory < ./clangd.input 80.51s user 5.40s system 333% cpu 25.777 total Reviewers: kadircet, sammccall Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66226 ------------------------------------------------------------------------ llvm-svn: 369879
-
- Aug 23, 2019
-
-
Anastasia Stulova authored
Differential Revision: https://reviews.llvm.org/D66294 llvm-svn: 369758
-
Nico Weber authored
llvm-svn: 369753
-
Hans Wennborg authored
------------------------------------------------------------------------ r369445 | mstorsjo | 2019-08-20 23:08:14 +0200 (Tue, 20 Aug 2019) | 9 lines [COFF] Check errorCount before committing the output file This avoids producing an output file if errors appeared late in the linking process (e.g. while fixing relocations, or as in the test, while checking for multiple resources). If an output file is produced, build tools might not retry building it on rebuilds, even if a previous build failed due to the error return code. Differential Revision: https://reviews.llvm.org/D66491 ------------------------------------------------------------------------ llvm-svn: 369752
-
Alex Denisov authored
llvm-svn: 369744
-
Hans Wennborg authored
------------------------------------------------------------------------ r368145 | ruiu | 2019-08-07 12:16:21 +0200 (Wed, 07 Aug 2019) | 3 lines Handle /align option. Differential Revision: https://reviews.llvm.org/D65736 ------------------------------------------------------------------------ llvm-svn: 369743
-
Hans Wennborg authored
------------------------------------------------------------------------ r369641 | yaxunl | 2019-08-22 13:18:59 +0200 (Thu, 22 Aug 2019) | 4 lines [OpenCL] Fix declaration of enqueue_marker Differential Revision: https://reviews.llvm.org/D66512 ------------------------------------------------------------------------ llvm-svn: 369738
-
- Aug 22, 2019
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r367580 | atanasyan | 2019-08-01 18:04:29 +0200 (Thu, 01 Aug 2019) | 18 lines [mips] Fix lowering load/store instruction in PIC case If an operand of the `lw/sw` instructions is a symbol, these instructions incorrectly lowered using not-position-independent chain of commands. For PIC code we should use `lw/addiu` instructions with the `R_MIPS_GOT16` and `R_MIPS_LO16` relocations respectively. Instead of that LLVM generates position dependent code with the `R_MIPS_HI16` and `R_MIPS_LO16` relocations. This patch provides a fix for the bug by handling PIC case separately in the `MipsAsmParser::expandMemInst`. The main idea is to generate a chain of PIC instructions to load a symbol address into a register and then load the address content. The fix is not optimal and does not fix all PIC-related problems. This is a task for subsequent patches. Differential Revision: https://reviews.llvm.org/D65524 ------------------------------------------------------------------------ llvm-svn: 369663
-
Hans Wennborg authored
------------------------------------------------------------------------ r369426 | mstorsjo | 2019-08-20 20:58:05 +0200 (Tue, 20 Aug 2019) | 5 lines [TargetMachine] Don't try to create COFFSTUB references on windows on non-COFF This avoids spurious relocation types for windows/elf targets. Differential Revision: https://reviews.llvm.org/D66401 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r369443 | mstorsjo | 2019-08-20 22:58:02 +0200 (Tue, 20 Aug 2019) | 11 lines [test] Fix tests when run on windows after SVN r369426. NFC. When running tests on windows, invoking "llc -march=<arch>" will implicitly use windows as the target os, making these tests misbehave after this change. Fix the issue by using more specific -mtriple values instead of plain -march in these tests. This should hopefully fix buildbot failures like http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/9816. ------------------------------------------------------------------------ llvm-svn: 369654
-
Hans Wennborg authored
------------------------------------------------------------------------ r369095 | lewis-revill | 2019-08-16 12:28:34 +0200 (Fri, 16 Aug 2019) | 11 lines [RISCV] Lower inline asm constraint A for RISC-V This allows arguments with the constraint A to be lowered to input nodes for RISC-V, which implies a memory address stored in a register. This patch adds the minimal amount of code required to get operands with the right constraints to compile. https://reviews.llvm.org/D54296 ------------------------------------------------------------------------ llvm-svn: 369651
-
Hans Wennborg authored
------------------------------------------------------------------------ r369093 | lewis-revill | 2019-08-16 12:23:56 +0200 (Fri, 16 Aug 2019) | 11 lines [RISCV] Add inline asm constraint A for RISC-V This allows the constraint A to be used in inline asm for RISC-V, which allows an address held in a register to be used. This patch adds the minimal amount of code required to get operands with the right constraints to compile. Differential Revision: https://reviews.llvm.org/D54295 ------------------------------------------------------------------------ llvm-svn: 369649
-
Hans Wennborg authored
------------------------------------------------------------------------ r369537 | davidspickett | 2019-08-21 17:38:24 +0200 (Wed, 21 Aug 2019) | 7 lines [libcxx] Only declare contents of threading API when _LIBCPP_HAS_THREAD_API_EXTERNAL is not defined. When it is defined they will be declared by the __external_threading header instead. Differential revision: https://reviews.llvm.org/D66518 ------------------------------------------------------------------------ llvm-svn: 369639
-
- Aug 21, 2019
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r369251 | stulova | 2019-08-19 13:43:16 +0200 (Mon, 19 Aug 2019) | 10 lines [OpenCL] Fix addr space deduction for pointers/references to arrays. Rewrite the logic for detecting if we are deducing addr space of a pointee type to take into account special logic for arrays. For pointers/references to arrays we can have any number of parentheses expressions as well as nested pointers. Differential Revision: https://reviews.llvm.org/D66137 ------------------------------------------------------------------------ llvm-svn: 369499
-
Hans Wennborg authored
------------------------------------------------------------------------ r369399 | marshall | 2019-08-20 18:16:23 +0200 (Tue, 20 Aug 2019) | 1 line Fix availability of __thread_id on builds with external threading. Reviewed as https://reviews.llvm.org/D66480 ------------------------------------------------------------------------ llvm-svn: 369498
-
- Aug 20, 2019
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r368867 | marshall | 2019-08-14 18:21:27 +0200 (Wed, 14 Aug 2019) | 1 line Rework recursive_timed_mutex so that it uses __thread_id instead of using the lower-level __libcpp_thread_id. This is prep for fixing PR42918. Reviewed as https://reviews.llvm.org/D65895 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r368916 | marshall | 2019-08-14 22:54:56 +0200 (Wed, 14 Aug 2019) | 1 line Fix thread comparison by making sure we never pass our special 'not a thread' value to the underlying implementation. Fixes PR#42918. ------------------------------------------------------------------------ llvm-svn: 369369
-
Hans Wennborg authored
------------------------------------------------------------------------ r367412 | rksimon | 2019-07-31 13:35:01 +0200 (Wed, 31 Jul 2019) | 1 line [X86][AVX] Add reduced test case for PR42833 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r367429 | rksimon | 2019-07-31 14:55:39 +0200 (Wed, 31 Jul 2019) | 3 lines [X86][AVX] Ensure chained subvector insertions are the same size (PR42833) Before combining insert_subvector(insert_subvector(vec, sub0, c0), sub1, c1) patterns, ensure that the subvectors are all the same type. On AVX512 targets especially we might have a mixture of 128/256 subvector insertions. ------------------------------------------------------------------------ llvm-svn: 369362
-
Hans Wennborg authored
------------------------------------------------------------------------ r369043 | rnk | 2019-08-15 21:45:28 +0200 (Thu, 15 Aug 2019) | 15 lines [Sema] Implement DR2386 for C++17 structured binding Allow implementations to provide complete definitions of std::tuple_size<T>, but to omit the 'value' member to signal that T is not tuple-like. The Microsoft standard library implements std::tuple_size<const T> this way. If the value member exists, clang still validates that it is an ICE, but if it does not, then the type is considered to not be tuple-like. Fixes PR33236 Reviewers: rsmith Differential Revision: https://reviews.llvm.org/D66040 ------------------------------------------------------------------------ llvm-svn: 369361
-
Hans Wennborg authored
------------------------------------------------------------------------ r369199 | yhs | 2019-08-18 00:12:00 +0200 (Sun, 18 Aug 2019) | 26 lines [BPF] Fix bpf llvm-objdump issues. Commit https://reviews.llvm.org/D57939 ("[DWARF] Refactor RelocVisitor and fix computation of SHT_RELA-typed relocation entries) made a change for relocation resolution when operating on an object file. The change unfortunately broke BPF as given SymbolValue (S) and Addent (A), previously relocation is resolved to S + A and after the change, it is resolved to S This patch fixed the issue by resolving relocation correctly. It looks not all relocation resolution reaches here and I did not trace down exactly when. But I do find if the object file includes codes in two different ELF sections than default ".text", the above bug will be triggered. This patch included a trivial two function source code to demonstrate this issue. The relocation for .debug_loc is resolved incorrectly due to this and llvm-objdump cannot display source annotated assembly. Differential Revision: https://reviews.llvm.org/D66372 ------------------------------------------------------------------------ llvm-svn: 369359
-
Hans Wennborg authored
------------------------------------------------------------------------ r369084 | ctopper | 2019-08-16 06:47:44 +0200 (Fri, 16 Aug 2019) | 5 lines [X86] Manually reimplement getTargetInsertSubreg in X86DAGToDAGISel::matchBitExtract so we can call insertDAGNode on the target constant. This is needed to maintain the topological sort order. Fixes PR42992. ------------------------------------------------------------------------ llvm-svn: 369357
-
Hans Wennborg authored
------------------------------------------------------------------------ r369168 | spatel | 2019-08-17 01:10:34 +0200 (Sat, 17 Aug 2019) | 16 lines [CodeGenPrepare] Fix use-after-free If OptimizeExtractBits() encountered a shift instruction with no operands at all, it would erase the instruction, but still return false. This previously didn’t matter because its caller would always return after processing the instruction, but https://reviews.llvm.org/D63233 changed the function’s caller to fall through if it returned false, which would then cause a use-after-free detectable by ASAN. This change makes OptimizeExtractBits return true if it removes a shift instruction with no users, terminating processing of the instruction. Patch by: @brentdax (Brent Royal-Gordon) Differential Revision: https://reviews.llvm.org/D66330 ------------------------------------------------------------------------ llvm-svn: 369355
-
Hans Wennborg authored
------------------------------------------------------------------------ r369026 | jmorse | 2019-08-15 19:49:46 +0200 (Thu, 15 Aug 2019) | 17 lines [DebugInfo] Avoid crash from dropped fragments in LiveDebugValues This patch avoids a crash caused by DW_OP_LLVM_fragments being dropped from DIExpressions by LiveDebugValues spill-restore code. The appearance of a previously unseen fragment configuration confuses LDV, as documented in PR42773, and reproduced by the test function this patch adds (Crashes on a x86_64 debug build). To avoid this, on spill restore, we now use fragment information from the spilt-location-expression. In addition, when spilling, we now don't spill any DBG_VALUE with a complex expression, as it can't be safely restored and will definitely lead to an incorrect variable location. The discussion of this is in D65368. Differential Revision: https://reviews.llvm.org/D66284 ------------------------------------------------------------------------ llvm-svn: 369354
-
Hans Wennborg authored
Restrict the NetBSD ASan TSD fallback to !ASAN_DYNAMIC The fallback to the alternative implementation of TSD with TLS is only needed for the static version of ASan for NetBSD. The same code cannot be reused for the dynamic version of ASan as TLS breaks and TSD code works. llvm-svn: 369341 -
Hans Wennborg authored
Update generate_netbsd_ioctls.awk for NetBSD 9.99.3 Register new ioctl argument types passed in ioctl(2) calls. llvm-svn: 369340 -
Hans Wennborg authored
Sync ioctl(2) list with NetBSD 9.99.3 Register 36 new ioctl(2) calls. Enable NVMM for amd64 as the API has been stabilized. llvm-svn: 369339 -
Hans Wennborg authored
------------------------------------------------------------------------ r369097 | lewis-revill | 2019-08-16 14:00:56 +0200 (Fri, 16 Aug 2019) | 8 lines [RISCV] Allow parsing of bare symbols with offsets This patch allows symbols followed by an expression for an offset to be parsed as bare symbols. Differential Revision: https://reviews.llvm.org/D57332 ------------------------------------------------------------------------ llvm-svn: 369338
-
Hans Wennborg authored
------------------------------------------------------------------------ r369011 | bogner | 2019-08-15 17:36:13 +0200 (Thu, 15 Aug 2019) | 4 lines [cmake] install_symlink should obey DESTDIR unconditionally Setting DESTDIR was erroneously buried under a condition here - if it's set it should always be used. ------------------------------------------------------------------------ llvm-svn: 369335
-
Hans Wennborg authored
> Author: maskray > Date: Thu Jul 11 19:01:51 2019 > New Revision: 365860 > > URL: http://llvm.org/viewvc/llvm-project?rev=365860&view=rev > Log: > [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-frame-pointer > > Use a tri-state enum to represent shouldUseFramePointer() and > shouldUseLeafFramePointer(). > > This simplifies the logic and fixes PR9825: > -fno-omit-frame-pointer doesn't imply -mno-omit-leaf-frame-pointer. > > and PR24003: > /Oy- /O2 should not omit leaf frame pointer: this matches MSVC x86-32. > (/Oy- is a no-op on MSVC x86-64.) > > and: > when CC1 option -mdisable-fp-elim if absent, -momit-leaf-frame-pointer > can also be omitted. > > The new behavior matches GCC: > -fomit-frame-pointer wins over -mno-omit-leaf-frame-pointer > -fno-omit-frame-pointer loses out to -momit-leaf-frame-pointer > > The behavior makes lots of sense. We have 4 states: > > - 00) leaf retained, non-leaf retained > - 01) leaf retained, non-leaf omitted (this is invalid) > - 10) leaf omitted, non-leaf retained (what -momit-leaf-frame-pointer was designed for) > - 11) leaf omitted, non-leaf omitted > > "omit" options taking precedence over "no-omit" options is the only way > to make 3 valid states representable with -f(no-)?omit-frame-pointer and > -m(no-)?omit-leaf-pointer. > > Reviewed By: ychen > > Differential Revision: https://reviews.llvm.org/D64294 llvm-svn: 369333
-
- Aug 16, 2019
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r368940 | rsmith | 2019-08-15 00:57:50 +0200 (Thu, 15 Aug 2019) | 19 lines Fix handling of class member access into a vector type. When handling a member access into a non-class, non-ObjC-object type, we would perform a lookup into the surrounding scope as if for an unqualified lookup. If the member access was followed by a '<' and this lookup (or the typo-correction for it) found a template name, we'd treat the member access as naming that template. Now we treat such accesses as never naming a template if the type of the object expression is of vector type, so that vector component accesses are never misinterpreted as naming something else. This is not entirely correct, since it is in fact valid to name a template from the enclosing scope in this context, when invoking a pseudo-destructor for the vector type via an alias template, but that's very much a corner case, and this change leaves that case only as broken as the corresponding case for Objective-C types is. This incidentally adds support for dr2292, which permits a 'template' keyword at the start of a member access naming a pseudo-destructor. ------------------------------------------------------------------------ llvm-svn: 369087
-
Hans Wennborg authored
------------------------------------------------------------------------ r367019 | chill | 2019-07-25 15:56:04 +0200 (Thu, 25 Jul 2019) | 10 lines [AArch64][SVE] Allow explicit size specifier for predicate operand ... for the vector forms of `{SQ,UQ,}{INC,DEC}P` instructions. Also continue supporting the exsting behaviour of not requiring an explicit size specifier. The preferred disasembly is *with* the specifier. This is implemented by redefining intruction forms to require vector predicates with explicit size and adding aliases, which allow a predicate with no size. Differential Revision: https://reviews.llvm.org/D65145 ------------------------------------------------------------------------ llvm-svn: 369086 -
Hans Wennborg authored
------------------------------------------------------------------------ r368873 | void | 2019-08-14 18:44:07 +0200 (Wed, 14 Aug 2019) | 15 lines Ignore indirect branches from callbr. Summary: We can't speculate around indirect branches: indirectbr and invoke. The callbr instruction needs to be included here. Reviewers: nickdesaulniers, manojgupta, chandlerc Reviewed By: chandlerc Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66200 ------------------------------------------------------------------------ llvm-svn: 369085
-
Chris Bieneman authored
llvm-svn: 369017
-
- Aug 15, 2019
-
-
Chris Bieneman authored
llvm-svn: 368894
-
- Aug 14, 2019
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r367084 | kongyi | 2019-07-26 07:17:14 +0200 (Fri, 26 Jul 2019) | 6 lines Fix macOS build after r358716 COPYFILE_CLONE is only defined on newer macOS versions, using it without check breaks build on systems running legacy OS and toolchain. Differential Revision: https://reviews.llvm.org/D65317 ------------------------------------------------------------------------ llvm-svn: 368848
-
Hans Wennborg authored
------------------------------------------------------------------------ r368300 | lenary | 2019-08-08 16:40:54 +0200 (Thu, 08 Aug 2019) | 18 lines [RISCV] Minimal stack realignment support Summary: Currently the RISC-V backend does not realign the stack. This can be an issue even for the RV32I/RV64I ABIs (where the stack is 16-byte aligned), though is rare. It will be much more comment with RV32E (though the alignment requirements for common data types remain under-documented...). This patch adds minimal support for stack realignment. It should cope with large realignments. It will error out if the stack needs realignment and variable sized objects are present. It feels like a lot of the code like getFrameIndexReference and determineFrameLayout could be refactored somehow, as right now it feels fiddly and brittle. We also seem to allocate a lot more memory than GCC does for equivalent C code. Reviewers: asb Reviewed By: asb Subscribers: wwei, jrtc27, s.egerton, MaskRay, Jim, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62007 ------------------------------------------------------------------------ llvm-svn: 368846
-
Hans Wennborg authored
------------------------------------------------------------------------ r368552 | stulova | 2019-08-12 12:44:07 +0200 (Mon, 12 Aug 2019) | 12 lines [OpenCL] Fix lang mode predefined macros for C++ mode. In C++ mode we should only avoid adding __OPENCL_C_VERSION__, all other predefined macros about the language mode are still valid. This change also fixes the language version check in the headers accordingly. Differential Revision: https://reviews.llvm.org/D65941 ------------------------------------------------------------------------ llvm-svn: 368844
-
Hans Wennborg authored
------------------------------------------------------------------------ r368561 | svenvh | 2019-08-12 14:44:26 +0200 (Mon, 12 Aug 2019) | 9 lines [OpenCL] Ignore parentheses for sampler initialization The sampler handling logic in SemaInit.cpp would inadvertently treat parentheses around sampler arguments as an implicit cast, leading to an unreachable "can't implicitly cast lvalue to rvalue with this cast kind". Fix by ignoring parentheses once we are in the sampler initializer case. Differential Revision: https://reviews.llvm.org/D66080 ------------------------------------------------------------------------ llvm-svn: 368843
-
- Aug 13, 2019
-
-
Hans Wennborg authored
------------------------------------------------------------------------ r368549 | hokein | 2019-08-12 11:35:04 +0200 (Mon, 12 Aug 2019) | 11 lines [clangd] Drop diags from non-written #include. Summary: This would fix that we show weird diagnostics on random lines of the main file. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66074 ------------------------------------------------------------------------ llvm-svn: 368683
-
Hans Wennborg authored
------------------------------------------------------------------------ r367303 | kadircet | 2019-07-30 12:26:51 +0200 (Tue, 30 Jul 2019) | 15 lines [clangd] Ignore diags from builtin files Summary: This fixes a case where we show diagnostics on arbitrary lines, in an internal codebase. Open for ideas on unittesting this. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64863 ------------------------------------------------------------------------ llvm-svn: 368682
-
Hans Wennborg authored
------------------------------------------------------------------------ r368516 | dim | 2019-08-10 21:07:38 +0200 (Sat, 10 Aug 2019) | 25 lines Add support for FreeBSD's LD_32_LIBRARY_PATH Summary: Because the dynamic linker for 32-bit executables on 64-bit FreeBSD uses the environment variable `LD_32_LIBRARY_PATH` instead of `LD_LIBRARY_PATH` to find needed dynamic libraries, running the 32-bit parts of the dynamic ASan tests will fail with errors similar to: ``` ld-elf32.so.1: Shared object "libclang_rt.asan-i386.so" not found, required by "Asan-i386-inline-Dynamic-Test" ``` This adds support for setting up `LD_32_LIBRARY_PATH` for the unit and regression tests. It will likely also require a minor change to the `TestingConfig` class in `llvm/utils/lit/lit`. Reviewers: emaste, kcc, rnk, arichardson Reviewed By: arichardson Subscribers: kubamracek, krytarowski, fedor.sergeev, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65772 ------------------------------------------------------------------------ llvm-svn: 368680
-