summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AArch64][SVE] Asm: Support for SVE condition code aliasesSander de Smalen2018-07-042-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SVE overloads the AArch64 PSTATE condition flags and introduces a set of condition code aliases for the assembler. The details are described in section 2.2 of the architecture reference manual supplement for SVE. In short: SVE alias => AArch64 name -------------------------- NONE => EQ ANY => NE NLAST => HS LAST => LO FIRST => MI NFRST => PL PMORE => HI PLAST => LS TCONT => GE TSTOP => LT Reviewers: rengolin, fhahn, SjoerdMeijer, samparker, javed.absar Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D48869 llvm-svn: 336245
* [Sema] Fix crash in getConstructorName.Ilya Biryukov2018-07-042-0/+13
| | | | | | | | | | | | | | | | Summary: Can happen when getConstructorName is called on invalid decls, specifically the ones that do not have the injected class name. Reviewers: bkramer, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48880 llvm-svn: 336244
* NFC - typo fix in test/CodeGen/avx512f-builtins.cGabor Buella2018-07-041-2/+2
| | | | llvm-svn: 336243
* [clangd] FileDistance: don't add duplicate edgesSam McCall2018-07-041-1/+3
| | | | llvm-svn: 336242
* [ImplicitNullChecks] Check for rewrite of register used in 'test' instructionMax Kazantsev2018-07-042-2/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | The following code pattern: mov %rax, %rcx test %rax, %rax %rax = .... je throw_npe mov(%rcx), %r9 mov(%rax), %r10 gets transformed into the following incorrect code after implicit null check pass: mov %rax, %rcx %rax = .... faulting_load_op("movl (%rax), %r10", throw_npe) mov(%rcx), %r9 For implicit null check pass, if the register that is checked for null value (ie, the register used in the 'test' instruction) is written into before the condition jump, we should avoid doing the optimization. Patch by Surya Kumari Jangala! Differential Revision: https://reviews.llvm.org/D48627 Reviewed By: skatkov llvm-svn: 336241
* PR33924: merge local declarations that have linkage of some kind withinRichard Smith2018-07-049-26/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | merged function definitions; also merge functions with deduced return types. This seems like two independent fixes, but unfortunately they are hard to separate because it's challenging to reliably test either one of them without also testing the other. A complication arises with deduced return type support: we need the type of the function in order to know how to merge it, but we can't load the actual type of the function because it might reference an entity declared within the function (and we need to have already merged the function to correctly merge that entity, which we would need to do to determine if the function types match). So we instead compare the declared function type when merging functions, and defer loading the actual type of a function with a deduced type until we've finished loading and merging the function. This reverts r336175, reinstating r336021, with one change (for PR38015): we look at the TypeSourceInfo of the first-so-far declaration of each function when considering whether to merge two functions. This works around a problem where the calling convention in the TypeSourceInfo for subsequent redeclarations may not match if it was implicitly adjusted. llvm-svn: 336240
* [Sema] Consider all format_arg attributes.Michael Kruse2018-07-042-6/+32
| | | | | | | | | | | | | | | | If a function has multiple format_arg attributes, clang only considers the first it finds (because AttributeLists are in reverse order, not necessarily the textually first) and ignores all others. Loop over all FormatArgAttr to print warnings for all declared format_arg attributes. For instance, libintl's ngettext (select plural or singular version of format string) has two __format_arg__ attributes. Differential Revision: https://reviews.llvm.org/D48734 llvm-svn: 336239
* [libFuzzer] [NFC] Inline static variable to avoid the linker warning.George Karpenkov2018-07-041-2/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D48650 llvm-svn: 336238
* [Support] Remove SaveOr which is no longer usedFangrui Song2018-07-031-12/+0
| | | | llvm-svn: 336237
* [lanai] Handle atomic load of i8 like regular load.Jacques Pienaar2018-07-031-0/+4
| | | | | | Loads and stores less than 64-bits are already atomic, this adds support for a special case thereof. This needs to be expanded. llvm-svn: 336236
* Ammend "Fix MSVC2015 compilation failure after r336206 patch".Alexander Polyakov2018-07-031-0/+2
| | | | llvm-svn: 336235
* [libFuzzer] add one more value profile metric, under a flag (experimental)Kostya Serebryany2018-07-036-7/+22
| | | | llvm-svn: 336234
* [Sema] Discarded statment should be an evaluatable context.Erik Pilkington2018-07-032-1/+14
| | | | | | | | | | The constexpr evaluator was erroring out because these templates weren't defined. Despite being used in a discarded statement, we still need to constexpr evaluate them, which means that we need to instantiate them. Fixes PR37585. Differential revision: https://reviews.llvm.org/D48322 llvm-svn: 336233
* [X86][AsmParser] Fix inconsistent declaration parameter name in r336218Fangrui Song2018-07-031-1/+1
| | | | llvm-svn: 336232
* Factor out Clang's desired 8MB stack size constant from the variousRichard Smith2018-07-035-20/+40
| | | | | | places we hardcode it. llvm-svn: 336231
* [libFuzzer] remove stale code, as suggested in https://reviews.llvm.org/D48800Kostya Serebryany2018-07-031-7/+0
| | | | llvm-svn: 336230
* [libFuzzer] add a tiny and surprisingly hard puzzleKostya Serebryany2018-07-031-0/+14
| | | | llvm-svn: 336229
* [clangd] Replace UniqueFunction with llvm::unique_function.Benjamin Kramer2018-07-039-84/+29
| | | | | | One implementation of this ought to be enough for everyone. llvm-svn: 336228
* [NVPTX] Expand v2f16 INSERT_VECTOR_ELTBenjamin Kramer2018-07-032-0/+9
| | | | | | Vectorization can create them. llvm-svn: 336227
* [X86] Remove repeated 'the' from multiple comments that have been copy and ↵Craig Topper2018-07-031-7/+7
| | | | | | pasted. NFC llvm-svn: 336226
* Fix allocation of Nullability attribute.Erich Keane2018-07-031-9/+7
| | | | | | | | | | | Existing code always allocates for on the declarator's attribute pool, but sometimes adds it to the declspec. This patch ensures that the correct pool is used. Discovered while testing: https://reviews.llvm.org/D48788 llvm-svn: 336225
* [X86] Add tests for low/high bit clearing with different attributes.Roman Lebedev2018-07-032-0/+2776
| | | | | | | | | | | | | | D48768 may turn some of these into shifts. Reviewers: spatel Reviewed By: spatel Subscribers: spatel, RKSimon, llvm-commits, craig.topper Differential Revision: https://reviews.llvm.org/D48767 llvm-svn: 336224
* [ARM] Fix inconsistent declaration parameter name in r336195Fangrui Song2018-07-031-1/+1
| | | | llvm-svn: 336223
* [AArch64] Make function parameter names in declarations match those of ↵Fangrui Song2018-07-031-8/+8
| | | | | | definitions llvm-svn: 336222
* [scudo] Get rid of builtin-declaration-mismatch warningsKostya Kortchinsky2018-07-031-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The C interceptors were using `SIZE_T` defined in the interception library as a `__sanitizer::uptr`. On some 32-bit platforms, this lead to the following warning: ``` warning: declaration of ‘void* malloc(SIZE_T)’ conflicts with built-in declaration ‘void* malloc(unsigned int)’ [-Wbuiltin-declaration-mismatch] INTERCEPTOR_ATTRIBUTE void *malloc(SIZE_T size) { ``` `__sanitizer::uptr` is indeed defined as an `unsigned long` on those. So just include `stddef.h` and use `size_t` instead. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D48885 llvm-svn: 336221
* [InstCombine] add tests for shuffle+binop with constant op1; NFCSanjay Patel2018-07-031-4/+25
| | | | | | This adds coverage for a planned enhancement for ConstantExpr::getBinOpIdentity() noted in D48830. llvm-svn: 336220
* Fix crash in clang.Zachary Turner2018-07-031-1/+3
| | | | | | | | | | This happened during a recent refactor. toStringRefArray() returns a vector<StringRef>, which was being implicitly converted to an ArrayRef<StringRef>, and then the vector was immediately being destroyed, so the ArrayRef<> was losing its backing storage. Fix this by making sure the vector gets permanent storage. llvm-svn: 336219
* [X86][AsmParser] Rework the in/out (%dx) hack one more time.Craig Topper2018-07-032-24/+45
| | | | | | | | This patch adds a new token type specifically for (%dx). We will now always create this token when we parse (%dx). After all operands have been parsed, if the mnemonic is in/out we'll morph this token to a regular register token. Otherwise we keep it as the special DX token which won't match any instructions. This removes the need for passing Mnemonic through the parsing functions. It also seems closer to gas where when its used on the wrong instruction it just gets diagnosed as an invalid operand rather than a bad memory address. llvm-svn: 336218
* [X86][AsmParser] Don't consider %eip as a valid register outside of 32-bit mode.Craig Topper2018-07-033-4/+4
| | | | | | | | This might make the error message added in r335668 unneeded, but I'm not sure yet. The check for RIP is technically unnecessary since RIP is in GR64, but that fact is kind of surprising so be explicit. llvm-svn: 336217
* Fix typo in lib/Support/Path.cpp to test commit accessVladimir Stefanovic2018-07-031-1/+1
| | | | llvm-svn: 336216
* [Constants] add identity constants for fadd/fmulSanjay Patel2018-07-034-15/+15
| | | | | | | | | | | | | | | | As the test diffs show, the current users of getBinOpIdentity() are InstCombine and Reassociate. SLP vectorizer is a candidate for using this functionality too (D28907). The InstCombine shuffle improvements are part of the planned enhancements noted in D48830. InstCombine actually has several other uses of getBinOpIdentity() via SimplifyUsingDistributiveLaws(), but we don't call that for any FP ops. Fixing that might be another part of removing the custom reassociation in InstCombine that is only done for fadd+fmul. llvm-svn: 336215
* [Reassociate] add tests for binop with identity constant; NFCSanjay Patel2018-07-031-0/+74
| | | | llvm-svn: 336214
* [scudo] Enable Scudo on PPC64Kostya Kortchinsky2018-07-031-1/+1
| | | | | | | | | | | | | | | | Summary: In conjunction with the clang side change D48833, this will enable Scudo on PPC64. I tested `check-scudo` on a powerpc64le box and everything passes. Reviewers: eugenis, alekseyshl Reviewed By: alekseyshl Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48834 llvm-svn: 336213
* Fix MSVC2015 compilation failure after r336206 patch.Alexander Polyakov2018-07-031-0/+6
| | | | | | Added missing headers. llvm-svn: 336212
* [Reassociate] regenerate checks; NFCSanjay Patel2018-07-031-77/+115
| | | | llvm-svn: 336211
* [AArch64][SVE] Asm: Support for FP Complex ADD/MLA.Sander de Smalen2018-07-037-4/+351
| | | | | | | | | | | | | | | | | | | | | | | | The variants added in this patch are: - Predicated Complex floating point ADD with rotate, e.g. fcadd z0.h, p0/m, z0.h, z1.h, #90 - Predicated Complex floating point MLA with rotate, e.g. fcmla z0.h, p0/m, z1.h, z2.h, #180 - Unpredicated Complex floating point MLA with rotate (indexed operand), e.g. fcmla z0.h, p0/m, z1.h, z2.h[0], #180 Reviewers: rengolin, fhahn, SjoerdMeijer, samparker, javed.absar Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D48824 llvm-svn: 336210
* [AArch64][GlobalISel] Fix fallbacks introduced in r336120 due to ↵Amara Emerson2018-07-033-6/+13
| | | | | | | | | | unselectable stores. r336120 resulted in falling back to SelectionDAG more often due to the G_STORE MMOs not matching the vreg size. This fixes that by explicitly any-extending the value. llvm-svn: 336209
* [Reassociate] add test for missing FP constant analysis; NFCSanjay Patel2018-07-031-3/+19
| | | | llvm-svn: 336208
* Rename lazy initialization functions to reflect behavior (NFC)Teresa Johnson2018-07-031-12/+12
| | | | | | Suggested in review for D48698. llvm-svn: 336207
* [lldb-mi] Re-implement symbol-list-lines command.Alexander Polyakov2018-07-0314-282/+101
| | | | | | | | | | | | | | Summary: Now this command uses SB API instead of HandleCommand. Reviewers: aprantl, clayborg Reviewed By: aprantl, clayborg Subscribers: ki.stfu, eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D48802 llvm-svn: 336206
* [AArch64][SVE] Asm: Support for FMUL (indexed)Sander de Smalen2018-07-037-3/+219
| | | | | | | | | | | | | | | | | | | | | | Unpredicated FP-multiply of SVE vector with a vector-element given by vector[index], for example: fmul z0.s, z1.s, z2.s[0] which performs an unpredicated FP-multiply of all 32-bit elements in 'z1' with the first element from 'z2'. This patch adds restricted register classes for SVE vectors: ZPR_3b (only z0..z7 are allowed) - for indexed vector of 16/32-bit elements. ZPR_4b (only z0..z15 are allowed) - for indexed vector of 64-bit elements. Reviewers: rengolin, fhahn, SjoerdMeijer, samparker, javed.absar Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D48823 llvm-svn: 336205
* [AArch64][SVE] Asm: Support for predicated unary operations.Sander de Smalen2018-07-0315-0/+557
| | | | | | | | | | | | | | | | | | The patch includes support for the following instructions: ABS z0.h, p0/m, z0.h NEG z0.h, p0/m, z0.h (S|U)XTB z0.h, p0/m, z0.h (S|U)XTB z0.s, p0/m, z0.s (S|U)XTB z0.d, p0/m, z0.d (S|U)XTH z0.s, p0/m, z0.s (S|U)XTH z0.d, p0/m, z0.d (S|U)XTW z0.d, p0/m, z0.d llvm-svn: 336204
* [clangd] Use default format style and fallback style. NFCEric Liu2018-07-031-3/+3
| | | | llvm-svn: 336203
* [Driver] Add PPC64 as supported for ScudoKostya Kortchinsky2018-07-032-1/+4
| | | | | | | | | | | | | | | | | | Summary: Scudo works on PPC64 as is, so mark the architecture as supported for it. This will also require a change to config-ix.cmake on the compiler-rt side. Update the tests accordingly. Reviewers: eugenis, alekseyshl Reviewed By: alekseyshl Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48833 llvm-svn: 336202
* [ELF][MIPS] Use llvm-mc to generate test case input file. NFCSimon Atanasyan2018-07-032-22/+23
| | | | llvm-svn: 336201
* Add new API to SBTarget and SBModule classes.Alexander Polyakov2018-07-038-0/+135
| | | | | | | | | | | | | | Summary: The new API allows to find a list of compile units related to target/module. Reviewers: aprantl, clayborg Reviewed By: aprantl Subscribers: jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D48801 llvm-svn: 336200
* [ELF] - Add a comment. NFC.George Rimar2018-07-031-0/+1
| | | | | | | Minor follow up for r336197 "[ELF] - Add support for '||' and '&&' in linker scripts." llvm-svn: 336199
* [DAGCombiner] visitSDIV - Permit MIN_SIGNED_VALUE in pow2 vector codegenSimon Pilgrim2018-07-032-179/+206
| | | | | | Now that D45806 has landed, we can re-enable support for MIN_SIGNED_VALUE in the sdiv by pow2-constant code llvm-svn: 336198
* [ELF] - Add support for '||' and '&&' in linker scripts.George Rimar2018-07-033-7/+29
| | | | | | | This is https://bugs.llvm.org//show_bug.cgi?id=37976, we had no support, but seems someone faced it. llvm-svn: 336197
* [InstCombine] fold shuffle-with-binop and common valueSanjay Patel2018-07-033-9/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the last significant change suggested in PR37806: https://bugs.llvm.org/show_bug.cgi?id=37806#c5 ...though there are several follow-ups noted in the code comments in this patch to complete this transform. It's possible that a binop feeding a select-shuffle has been eliminated by earlier transforms (or the code was just written like this in the 1st place), so we'll fail to match the patterns that have 2 binops from: D48401, D48678, D48662, D48485. In that case, we can try to materialize identity constants for the remaining binop to fill in the "ghost" lanes of the vector (where we just want to pass through the original values of the source operand). I added comments to ConstantExpr::getBinOpIdentity() to show planned follow-ups. For now, we only handle the 5 commutative integer binops (add/mul/and/or/xor). Differential Revision: https://reviews.llvm.org/D48830 llvm-svn: 336196
OpenPOWER on IntegriCloud