summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [docs] [tools] Fix see also linksAlex Brachet2019-07-047-7/+7
| | | | | | | | | | | | | | | | Summary: Changes "see also" links to use :manpage: instead of plain text or the form `name|name` which was being treated literally, not as a link. Reviewers: jhenderson, rupprecht Reviewed By: jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63970 llvm-svn: 365159
* [pstl] Use utilities from <functional> instead of reinventing the wheelLouis Dionne2019-07-046-100/+42
| | | | llvm-svn: 365158
* Add assert for 'bad' code path in GetUniqueNamespaceDeclarationRaphael Isemann2019-07-041-1/+2
| | | | | | | | | | | | | | | | | Summary: If we call this function with a non-namespace as a second argument (and a nullptr name), we currently only get a nullptr as a return when we hit the "Bad!!!" code path. This patch just adds an assert as this seems to be a programming error in the calling code. Reviewers: shafik Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D57880 llvm-svn: 365157
* [NFC][pstl] Do not name each header file in the leading commentLouis Dionne2019-07-0422-22/+22
| | | | | | | With the renaming that will happen, it's just a pain to maintain the right names. llvm-svn: 365156
* Plugins: permit building on Windows ARM64Saleem Abdulrasool2019-07-041-15/+12
| | | | | | | | | | Rather than relying on `sizeof(void *)` to determine the architecture, use the `CMAKE_SYSTEM_PROCESSOR` variable. This should allow us to build for Windows and cross-compile. Without this, we would attempt to build the x64 plugin on ARM64 which would fail due to the `CONTEXT` type being defined for ARM64 rather than `x64`. llvm-svn: 365155
* docs: add documentation for `LIBCXX_INCLUDE_TESTS`Saleem Abdulrasool2019-07-041-0/+6
| | | | | | | | Add some missing documentation for the `LIBCXX_INCLUDE_TESTS` option. Patch by Jean Heyd Meneide! llvm-svn: 365154
* [modules] Add PP callbacks for entering and leaving a submodule.Vassil Vassilev2019-07-042-0/+46
| | | | llvm-svn: 365153
* [NFC][pstl] Run clang-formatLouis Dionne2019-07-043-30/+30
| | | | llvm-svn: 365152
* [clangd] Mark a couple of unimportant flags as hidden. NFCSam McCall2019-07-041-2/+3
| | | | llvm-svn: 365151
* [pstl] Make sure we include the pstl_config header in the glue headersLouis Dionne2019-07-044-0/+7
| | | | llvm-svn: 365150
* [DAGCombiner] Don't combine (addcarry (uaddo X, Y), 0, Carry) -> (addcarry ↵Craig Topper2019-07-042-5/+6
| | | | | | | | | | | | | | | | | | | | | X, Y, Carry) if the Carry comes from the uaddo. Summary: The uaddo won't be removed and the addcarry will still be dependent on the uaddo. So we'll just increase the use count of X and Y and potentially require a COPY. Reviewers: spatel, RKSimon, deadalnix Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64190 llvm-svn: 365149
* [AMDGPU] Custom lower INSERT_SUBVECTOR v3, v4, v5, v8Tim Renouf2019-07-043-8/+69
| | | | | | | | | | | | | | | | | | | Summary: Since the changes to introduce vec3 and vec5, INSERT_VECTOR for these sizes has been marked "expand", which made LegalizeDAG lower it to loads and stores via a stack slot. The code got optimized a bit later, but the now-unused stack slot was never deleted. This commit avoids that problem by custom lowering INSERT_SUBVECTOR into an EXTRACT_VECTOR_ELT and INSERT_VECTOR_ELT for each element in the subvector to insert. V2: Addressed review comments re test. Differential Revision: https://reviews.llvm.org/D63160 Change-Id: I9e3c13e36f68cfa3431bb9814851cc1f673274e1 llvm-svn: 365148
* [InstCombine] allow undef elements when forming splat from chain of ↵Sanjay Patel2019-07-042-16/+34
| | | | | | | | | | | | | | | | | | insertelements We allow forming a splat (broadcast) shuffle, but we were conservatively limiting that to cases where all elements of the vector are specified. It should be safe from a codegen perspective to allow undefined lanes of the vector because the expansion of a splat shuffle would become the chain of inserts again. Forming splat shuffles can reduce IR and help enable further IR transforms. Motivating bugs: https://bugs.llvm.org/show_bug.cgi?id=42174 https://bugs.llvm.org/show_bug.cgi?id=16739 Differential Revision: https://reviews.llvm.org/D63848 llvm-svn: 365147
* Fix typos in comments and debug output.Jay Foad2019-07-041-3/+3
| | | | llvm-svn: 365146
* [X86][SSE] Add partial dereferenceable vector load test inspired by PR21780Simon Pilgrim2019-07-041-4/+42
| | | | llvm-svn: 365145
* llvm-c-test avoid calling malloc(0)Andus Yu2019-07-041-6/+12
| | | | | | | | | | | | | | | | | | | Summary: As explained in D63668, malloc(0) could return a null pointer. llvm-c-test does not handle this case correctly. Instead of calling malloc(0), avoid the operation altogether. Authored By: andusy Reviewers: hubert.reinterpretcast, xingxue, jasonliu, daltenty, cebowleratibm Reviewed By: hubert.reinterpretcast Subscribers: mehdi_amini, dexonsmith, jsji, llvm-commits Tags: LLVM Differential Revision: https://reviews.llvm.org/D63788 llvm-svn: 365144
* [LLD][ELF] - Linkerscript: add a support for expressions for section's fillingGeorge Rimar2019-07-044-29/+46
| | | | | | | | | | | | | | | | | | | Imagine the script: .section: { ... } = FILL_EXPR LLD assumes that FILL_EXPR is a number, and does not allow it to be an expression. Though that is allowed by specification: https://sourceware.org/binutils/docs-2.32/ld/Output-Section-Fill.html This patch adds a support for cases when FILL_EXPR is simple math expression. Fixes https://bugs.llvm.org/show_bug.cgi?id=42482. Differential revision: https://reviews.llvm.org/D64130 llvm-svn: 365143
* Document legacy pass manager extension pointsSerge Guelton2019-07-042-3/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D64093 llvm-svn: 365142
* [NFC] Added tests for D64099David Bolvansky2019-07-041-0/+241
| | | | llvm-svn: 365141
* [clangd] Fix breakage on gcc 5.4Kadir Cetinkaya2019-07-041-1/+1
| | | | llvm-svn: 365140
* [ELF] Allow placing non-string SHF_MERGE sections with different alignments ↵Fangrui Song2019-07-045-49/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into the same MergeSyntheticSection The difference from D63432/r365015 is that this patch does not place SHF_STRINGS sections with different alignments into the same MergeSyntheticSection. Doing that would: (1) create unnecessary padding and thus waste space. Add a test tail-merge-string-align2.s to check no extra padding is created. (2) make some input sections unaligned when tail merge (-O2) is enabled. The alignment of MergeTailAlignment::Builder was out of sync in D63432. MOVAPS on such unaligned strings can raise SIGSEGV. This should fix PR42289: the Linux kernel has a use case that input files have .rodata.cst32 sections with different alignments. The expectation (and what ld.bfd and gold do) is that in the -r link, there is only one .rodata.cst32 (SHF_MERGE sections with different alignments can be combined), but lld currently creates one for each different alignment. The current merging strategy: 1) Group SHF_MERGE sections by (name, sh_flags, sh_entsize and sh_addralign). Merging is performed among a group, even if -O0 is specified. 2) Create one output section for each group. This is a special case in addInputSec(). This patch changes 1) to: 1) Group SHF_MERGE sections by (name, sh_flags, sh_entsize). Merging is performed among a group, even if -O0 is specified. We will thus create just one .rodata.cst32 . This also improves merging efficiency when sections with the same name but different alignments are combined. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D64200 llvm-svn: 365139
* [X86][SSE] Add some partial dereferenceable vector load tests inspired by ↵Simon Pilgrim2019-07-041-0/+176
| | | | | | PR16739 llvm-svn: 365138
* [AMDGPU] Correct the setting of `FlatScratchInit`.Michael Liao2019-07-042-3/+16
| | | | | | | | | | | | | | Summary: - That flag setting should skip spilling stack slot. Reviewers: arsenm, rampitec Subscribers: qcolombet, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64143 llvm-svn: 365137
* [X86] Regenerate load fold peephole test.Simon Pilgrim2019-07-041-4/+14
| | | | llvm-svn: 365136
* [clangd] Some tweaks on semantic highlighting lookuptable.Haojian Wu2019-07-044-23/+28
| | | | | | | | | | | | | | | | Summary: - move toTextMateScope to SemanticHighlighting.h; - move the buildLookupTable to LSP layer (as LSP requires such form); Reviewers: sammccall, jvikstrom Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64202 llvm-svn: 365135
* [clangd] Fix a lifetime bug in QueryDriverKadir Cetinkaya2019-07-041-8/+12
| | | | llvm-svn: 365134
* [CTU] Add support for virtual functionsGabor Marton2019-07-044-2/+34
| | | | | | | | | | | | Reviewers: Szelethus, xazax.hun Subscribers: rnkovacs, dkrupp, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63920 llvm-svn: 365133
* [clangd] Query driver reads stderr and passes driver as first argumentKadir Cetinkaya2019-07-042-18/+17
| | | | | | | | | | | | | | | | | Summary: gcc invokes cc1 through a path deduced from argv[0] therefore it must be correctly set. Also it prints the search path to stderr not stdout, this also applies to clang. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64196 llvm-svn: 365132
* [ELF] Fix weak-undef-shared.s after r365129Fangrui Song2019-07-041-0/+1
| | | | llvm-svn: 365131
* [clangd] Add a hidden tweak to annotate all highlighting tokens of the file.Haojian Wu2019-07-043-0/+91
| | | | | | | | | | | | Reviewers: sammccall, jvikstrom Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64137 llvm-svn: 365130
* [ELF] resolveUndefined: ignore undefined symbols in SharedFile for Undefined ↵Fangrui Song2019-07-043-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and SharedSymbol If %t1.o has a weak reference on foo, and %t2.so has a non-weak reference on foo: `ld.lld %t1.o %t2.so -o %t` We incorrectly set the binding of the undefined foo to STB_GLOBAL. Fix this by ignoring undefined symbols in a SharedFile for Undefined and SharedSymbol. This fixes the binding of pthread_once when the program links against both librt.so and libpthread.so ``` a.o: STB_WEAK reference to pthread_once librt.so: STB_GLOBAL reference to pthread_once # should be ignored libstdc++.so: STB_WEAK reference to pthread_once # should be ignored libgcc_s.so.1: STB_WEAK reference to pthread_once # should be ignored ``` The STB_GLOBAL pthread_once issue (not fixed by D63974) can cause a link error when the result DSO is used to link another DSO with -z defs if -lpthread is not specified. (libstdc++.so.6 not having a dependency on libpthread.so is a really nasty hack...) We happened to create a weak undef before D63974 because libgcc_s.so.1 was linked the last and it changed the binding again to weak. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D64136 llvm-svn: 365129
* Fix -Wdocumentation param warning.Simon Pilgrim2019-07-041-2/+2
| | | | | | Don't put the full stop at the end of a param name - it confuses the doxygen parser llvm-svn: 365128
* Fix -Wdocumentation warning.Simon Pilgrim2019-07-041-3/+2
| | | | llvm-svn: 365127
* Fix -Wdocumentation warning.Simon Pilgrim2019-07-041-1/+1
| | | | llvm-svn: 365126
* [X86][AVX1] Combine concat_vectors(pshufd(x,c),pshufd(y,c)) -> ↵Simon Pilgrim2019-07-0410-97/+54
| | | | | | | | vpermilps(concat_vectors(x,y),c) Bitcast v4i32 to v8f32 and back again - it might be worth adding isel patterns for X86PShufd v8i32 on AVX1 targets like we did for X86Blendi to avoid the bitcasts? llvm-svn: 365125
* [clangd] Turn background-index on by defaultKadir Cetinkaya2019-07-041-1/+1
| | | | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64019 llvm-svn: 365124
* [clangd] Make HadErrors part of background index's internal stateKadir Cetinkaya2019-07-043-68/+101
| | | | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64147 llvm-svn: 365123
* [clangd] Add HadErrors field into shardsKadir Cetinkaya2019-07-047-15/+59
| | | | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64133 llvm-svn: 365122
* [clangd] Store hash of command line in index shards.Kadir Cetinkaya2019-07-045-1/+149
| | | | | | | | | | | | | | Summary: This is to enable cache invalidation when command line flags changes. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64018 llvm-svn: 365121
* [clangd] Also cache failures while indexingKadir Cetinkaya2019-07-045-16/+68
| | | | | | | | | | | | | | | | Summary: Clangd currently doesn't cache any indexing failures, which results in retrying those failed files even if their contents haven't changed. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63986 llvm-svn: 365120
* Fix MSVC "not all control paths return a value" warnings. NFCI.Simon Pilgrim2019-07-041-4/+2
| | | | llvm-svn: 365119
* [Remarks] Silence gcc warning by catching unhandled values in switchesMikael Holmen2019-07-041-0/+4
| | | | | | | | | | | | | | | | | | | Without this fix gcc (7.4) complains with ../lib/Remarks/RemarkParser.cpp: In function 'std::unique_ptr<llvm::remarks::ParserImpl> formatToParserImpl(llvm::remarks::ParserFormat, llvm::StringRef)': ../lib/Remarks/RemarkParser.cpp:29:1: error: control reaches end of non-void function [-Werror=return-type] } ^ ../lib/Remarks/RemarkParser.cpp: In function 'std::unique_ptr<llvm::remarks::ParserImpl> formatToParserImpl(llvm::remarks::ParserFormat, llvm::StringRef, const llvm::remarks::ParsedStringTable&)': ../lib/Remarks/RemarkParser.cpp:38:1: error: control reaches end of non-void function [-Werror=return-type] } ^ The Format enum currently only contains the value YAML which is indeed already handled in the switches, but gcc complains anyway. Adding a default case with an llvm_unreachable silences gcc. llvm-svn: 365118
* [ARM] Favour PL/MI over GE/LT when possibleDavid Green2019-07-049-195/+181
| | | | | | | | | | | | | | | The arm condition codes for GE is N==V (and for LT is N!=V). If the source of flags cannot set V (overflow), such as a cmp against #0, then we can use the simpler PL and MI conditions that only check N. As these PL/MI conditions are simpler than GE/LT, other passes like the peephole optimiser can have a better time optimising away the redundant CMPs. The exception is the VSEL instruction, which cannot take the PL code, so there the transform favours GE. Differential Revision: https://reviews.llvm.org/D64160 llvm-svn: 365117
* [ARM] Added testing for D64160. NFCDavid Green2019-07-044-156/+437
| | | | | | | Adds some extra vsel testing and regenerates long shift and saturation bitop tests. llvm-svn: 365116
* [docs][llvm-dwarfdump] Remove unnecessary reference to --show-childrenJames Henderson2019-07-041-3/+1
| | | | | | | | | | | | | The --show-children option description describes what it does, and references the =<offset> parameter of section dump switches. I don't think it needs to be explained again in the documentation of the section dump switches too. Reviewed by: JDevlieghere Differential Revision: https://reviews.llvm.org/D64132 llvm-svn: 365115
* [TableGen] Allow DAG isel patterns to override default operands.Simon Tatham2019-07-044-10/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Tablegen instruction description uses `OperandWithDefaultOps`, isel patterns for that instruction don't have to fill in the default value for the operand in question. But the flip side is that they actually //can't// override the defaults even if they want to. This will be very inconvenient for the Arm backend, when we start wanting to write isel patterns that generate the many MVE predicated vector instructions, in the form with predication actually enabled. So this small Tablegen fix makes it possible to write an isel pattern either with or without values for a defaulted operand, and have the default values filled in only if they are not overridden. If all the defaulted operands come at the end of the instruction's operand list, there's a natural way to match them up to the arguments supplied in the pattern: consume pattern arguments until you run out, then fill in any missing instruction operands with their default values. But if defaulted and non-defaulted operands are interleaved, it's less clear what to do. This does happen in existing targets (the first example I came across was KILLGT, in the AMDGPU/R600 backend), and of course they expect the previous behaviour (that the default for those operands is used and a pattern argument is not consumed), so for backwards compatibility I've stuck with that. Reviewers: nhaehnle, hfinkel, dmgreen Subscribers: mehdi_amini, javed.absar, tpr, kristof.beyls, steven_wu, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63814 llvm-svn: 365114
* [ARM] MVE bitwise instruction patternsDavid Green2019-07-045-3/+122
| | | | | | | | | | | | This adds patterns for the simpler VAND, VORR and VEOR bitwise vector instructions. It also adjusts the top16Zero PatLeaf to not match on vector instructions, which can otherwise cause problems. Code written by David Sherwood. Differential Revision: https://reviews.llvm.org/D63867 llvm-svn: 365113
* [clangd] Add missing changes for 365111Johan Vikstrom2019-07-042-45/+4
| | | | llvm-svn: 365112
* [clangd] Emit publishSemanticHighlighting in LSP if enabledJohan Vikstrom2019-07-048-3/+279
| | | | | | | | | | | | | | Summary: Emit publishSemanticHighlighting in LSP if enabled Reviewers: hokein, kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63919 llvm-svn: 365111
* [NFC][PowerPC] Make the PowerPC scheduling strategy feature only control the ↵QingShan Zhang2019-07-041-10/+10
| | | | | | strategy instead of the scheduler. llvm-svn: 365110
OpenPOWER on IntegriCloud