summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [RegisterBankInfo] Fix 80-col introduced in r293506.Quentin Colombet2017-05-041-3/+6
| | | | | | NFC. llvm-svn: 302202
* [GlobalISel] Add missing doxygen keyword for doxygen groups.Quentin Colombet2017-05-044-11/+11
| | | | | | NFC llvm-svn: 302201
* AMDGPU: GFX9 GS and HS shaders always have the scratch wave offset in SGPR5Marek Olsak2017-05-045-31/+123
| | | | | | | | | | Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D32645 llvm-svn: 302200
* [GISel]:Skip legalizing Intermediate inst(with generic types)Aditya Nandakumar2017-05-041-2/+7
| | | | | | | | | | During legalization, targets can create Pseudo Instructions with generic types. We shouldn't try to legalize them. Reviewed by Quentin, dsanders https://reviews.llvm.org/D32575 llvm-svn: 302199
* [JumpThreading] When processing compares, explicitly check that the result ↵Craig Topper2017-05-041-1/+1
| | | | | | | | type is not a vector rather than check for it being an integer. Compares always return a scalar integer or vector of integers. isIntegerTy returns false for vectors, but that's not completely obvious. So using isVectorTy is less confusing. llvm-svn: 302198
* [JumpThreading] Change a dyn_cast that is already protected by an isa check ↵Craig Topper2017-05-041-16/+14
| | | | | | | | to a static cast. Combine the with another static cast. NFC Differential Revision: https://reviews.llvm.org/D32874 llvm-svn: 302197
* [GISel]: Add support to translate ConstantVectorsAditya Nandakumar2017-05-042-0/+17
| | | | | | | Reviewed by Quentin https://reviews.llvm.org/D32814 llvm-svn: 302196
* Fix whitespace before token-paste of an argument.James Y Knight2017-05-043-19/+43
| | | | | | | | | | | | | | | The whitespace should come from the argument name in the macro expansion, rather than from the token passed to the macro (same as it does when not pasting). Added a new test case for the change in behavior to stringize_space.c. FileCheck'ized macro_paste_commaext.c, tweaked the test case, and added a comment; no behavioral change to this test. Differential Revision: https://reviews.llvm.org/D30427 llvm-svn: 302195
* [ConstantRange] Add LLVM_NODISCARD to ConstantRange since a large number of ↵Craig Topper2017-05-041-1/+1
| | | | | | its methods construct new ConstantRange objects. llvm-svn: 302194
* [Float2Int] Remove return of ConstantRange from seen method. Nothing uses it ↵Craig Topper2017-05-042-3/+2
| | | | | | so it just creates and discards a ConstantRange object for no reason. llvm-svn: 302193
* Strip trailing whitespace. NFCI.Simon Pilgrim2017-05-041-3/+3
| | | | llvm-svn: 302192
* [clangd] Add documentation pageMarc-Andre Laperle2017-05-042-0/+107
| | | | | | | | | | | | | | | | | | | Summary: Add a simple documentation page for Clangd. This will be useful for interested users and contributors to get basic information about how to get started and the progress of Clangd. Reviewers: krasimir, bkramer Reviewed By: krasimir Subscribers: Prazek, jbcoe, JDevlieghere, mgehre, JonasToth, kromanenkov, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D31887 llvm-svn: 302191
* Turn on -Wmicrosoft-enum-forward-reference by default.Nico Weber2017-05-041-1/+1
| | | | | | | | | clang-cl already errs or warns on everything that cl warns on in /permissive- mode, except for enum foward declarations (and ATL attributes). So warn on enum forward declarations by default. llvm-svn: 302190
* [InstSimplify] add folds for or-of-casted-icmpsSanjay Patel2017-05-042-51/+48
| | | | | | | | | | | | | | | | | The sibling folds for 'and' with casts were added with https://reviews.llvm.org/rL273200. This is a preliminary step for adding the 'or' variants for the folds added with https://reviews.llvm.org/rL301260. The reason for the strange form with constant LHS in the 1st test is because there's another missing fold in that case for the inverted predicate. That should be fixed when we add the ConstantRange functionality for 'or-of-icmps' that already exists for 'and-of-icmps'. I'm hoping to share more code for the and/or cases, so we won't have these differences. This will allow us to remove code from InstCombine. It's also possible that we can remove some code here in InstSimplify. I think we have some duplicated folds because patterns are not matched in a general way. Differential Revision: https://reviews.llvm.org/D32876 llvm-svn: 302189
* Fix bugs checking va_start in lambdas and erroneous contextsReid Kleckner2017-05-044-12/+78
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: First, getCurFunction looks through blocks and lambdas, which is wrong. Inside a lambda, va_start should refer to the lambda call operator prototype. This fixes PR32737. Second, we shouldn't use any of the getCur* methods, because they look through contexts that we don't want to look through (EnumDecl, CapturedStmtDecl). We can use CurContext directly as the calling context. Finally, this code assumed that CallExprs would never appear outside of code contexts (block, function, obj-c method), which is wrong. Struct member initializers are an easy way to create and parse exprs in a non-code context. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32761 llvm-svn: 302188
* Turn -Wmicrosoft-enum-value off by default.Nico Weber2017-05-041-1/+1
| | | | | | | | | The warning is currently way too noisy to be useful. The plan is to make it warn when an MS enum that's negative is compared to something, but until that's done the warning shouldn't default to on. llvm-svn: 302187
* Simplify the header allocation.Rafael Espindola2017-05-044-70/+52
| | | | | | | | | | | | | | | | In the non linker script case we would try very early to find out if we could allocate the headers. Failing to do that would add extra alignment to the first ro section, since we would set PageAlign thinking it was the first section in the PT_LOAD. In the linker script case the header allocation must be done in the end, causing some duplication. We now tentatively add the headers to the first PT_LOAD and if it turns out they don't fit, remove them. With this we only need to allocate the headers in one place in the code. llvm-svn: 302186
* [WebAssembly] Add wasm symbol table support to llvm-objdumpSam Clegg2017-05-043-22/+60
| | | | | | Differential Revision: https://reviews.llvm.org/D32760 llvm-svn: 302185
* Driver: only inject libstdc++ paths when needed on CrossWindowsSaleem Abdulrasool2017-05-042-5/+10
| | | | | | | | When building with libc++ don't bother with injecting the libstdc++ search paths into the linker search path. This will make it easier to switch between ld and lld. llvm-svn: 302184
* [PPC] When restoring R30 (PIC base pointer), mark it as <def>Krzysztof Parzyszek2017-05-042-2/+31
| | | | | | | | | This happened on the PPC32/SVR4 path and was discovered when building FreeBSD on PPC32. It was a typo-class error in the frame lowering code. This fixes PR26519. llvm-svn: 302183
* Fix test failure with GCC 4.9Eric Fiselier2017-05-041-0/+4
| | | | llvm-svn: 302182
* Change Appveyor to download Clang from llvm.org instead of my private serverEric Fiselier2017-05-042-10/+6
| | | | llvm-svn: 302181
* Don't return an invalid line table if the DW_AT_stmt_list value is not in ↵Greg Clayton2017-05-041-0/+4
| | | | | | the .debug_line section. llvm-svn: 302180
* [ms-inline-asm] Use the frontend size only for ambiguous instructionsReid Kleckner2017-05-049-155/+255
| | | | | | | | | | | | | | | | | | This avoids problems on code like this: char buf[16]; __asm { movups xmm0, [buf] mov [buf], eax } The frontend size in this case (1) is wrong, and the register makes the instruction matching unambiguous. There are also enough bytes available that we shouldn't complain to the user that they are potentially using an incorrectly sized instruction to access the variable. Supersedes D32636 and D26586 and fixes PR28266 llvm-svn: 302179
* [InstSimplify] move logic-of-icmps helper functions; NFCSanjay Patel2017-05-041-80/+80
| | | | | | | | Putting these next to each other should make it easier to see what's missing from each side. Patch to plug one of those holes should be posted soon. llvm-svn: 302178
* Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in ↵Peter Collingbourne2017-05-0415-223/+218
| | | | | | | | the module summary. NFCI." with a fix for the clang backend. llvm-svn: 302176
* Fix a typo.Michael Zolotukhin2017-05-041-2/+2
| | | | llvm-svn: 302175
* [InstSimplify] add tests for or-of-casted-icmps; NFCSanjay Patel2017-05-041-0/+58
| | | | llvm-svn: 302174
* [NewGVN] Remove unneeded newline and format assertions. NFCI.Davide Italiano2017-05-041-5/+4
| | | | llvm-svn: 302173
* Add markup for libc++ dylib availabilityMehdi Amini2017-05-04174-126/+1060
| | | | | | | | | | | | | | | Libc++ is used as a system library on macOS and iOS (amongst others). In order for users to be able to compile a binary that is intended to be deployed to an older version of the platform, clang provides the availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_ that can be placed on declarations to describe the lifecycle of a symbol in the library. See docs/DesignDocs/AvailabilityMarkup.rst for more information. Differential Revision: https://reviews.llvm.org/D31739 llvm-svn: 302172
* [APInt] Reduce number of allocations involved in multiplying. Reduce worst ↵Craig Topper2017-05-041-110/+10
| | | | | | | | | | | | | | | | | | | | | | case multiply size Currently multiply is implemented in operator*=. Operator* makes a copy and uses operator*= to modify the copy. Operator*= itself allocates a temporary buffer to hold the multiply result as it computes it. Then copies it to the buffer in *this. Operator*= attempts to bound the size of the result based on the number of active bits in its inputs. It also has a couple special cases to handle 0 inputs without any memory allocations or multiply operations. The best case is that it calculates a single word regardless of input bit width. The worst case is that it calculates the a 2x input width result and drop the upper bits. Since operator* uses operator*= it incurs two allocations, one for a copy of *this and one for the temporary allocation. Neither of these allocations are kept after the method operation is done. The main usage in the backend appears to be ConstantRange::multiply which uses operator* rather than operator*=. This patch moves the multiply operation to operator* and implements operator*= using it. This avoids the copy in operator*. operator* now allocates a result buffer sized the same width as its inputs no matter what. This buffer will be used as the buffer for the returned APInt. Finally, we reuse tcMultiply to implement the multiply operation. This function is capable of not calculating additional upper words that will be discarded. This change does lose the special optimizations for the inputs using less words than their size implies. But it also removed the getActiveBits calls from all multiplies. If we think those optimizations are important we could look at providing additional bounds to tcMultiply to limit the computations. Differential Revision: https://reviews.llvm.org/D32830 llvm-svn: 302171
* [PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline.Easwaran Raman2017-05-043-3/+15
| | | | | | Differential revision: https://reviews.llvm.org/D32768 llvm-svn: 302170
* [Lexicon] Add BDCEBrian Gesiak2017-05-041-0/+7
| | | | | | | | | | | | Summary: Add an entry to the Lexicon for "BDCE." Reviewers: jmolloy, hfinkel Reviewed By: jmolloy Differential Revision: https://reviews.llvm.org/D31861 llvm-svn: 302169
* Use lgamma_r instead of lgamma in binomial_distribution, because freakin' ↵Marshall Clow2017-05-041-4/+8
| | | | | | POSIX took a perfectly fine call and made it not thread safe. llvm-svn: 302168
* Add accidentally deleted testcase back.Adrian Prantl2017-05-041-0/+30
| | | | llvm-svn: 302167
* Cleanup tests to not share a DISubprogram between multiple Functions.Adrian Prantl2017-05-0410-149/+186
| | | | | | rdar://problem/31926379 llvm-svn: 302166
* [test-release] Status update *before* long gzipRenato Golin2017-05-041-5/+5
| | | | llvm-svn: 302165
* [clang-tidy] fix readability-implicit-bool-cast false positive with xorAlexander Kornienko2017-05-042-15/+20
| | | | llvm-svn: 302164
* [ScopBuilder] Add missing semicolon after LLVM_FALLTHROUGH.Michael Kruse2017-05-041-1/+1
| | | | | | It was forgotten in r302157. llvm-svn: 302163
* [test] Name the local variable in the C1XX implementation of DoNotOptmizeCasey Carter2017-05-041-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D32510 llvm-svn: 302162
* [clang-tidy] fix readability-implicit-bool-cast false alarm on |=, &=Alexander Kornienko2017-05-042-25/+28
| | | | llvm-svn: 302161
* [clang-tidy] Code cleanup, (almost) NFC (*).Alexander Kornienko2017-05-044-153/+96
| | | | | | | (*) Printed types of member pointers don't use elaborated type specifiers (`int struct S::*` -> `int S::*`). llvm-svn: 302160
* [Tooling] add a createReplacement overload for StringRefAlexander Kornienko2017-05-041-0/+7
| | | | llvm-svn: 302159
* [test] variant: enable constexpr construction tests on MSVC STLCasey Carter2017-05-045-4/+58
| | | | | | | * Add a new macro _MSVC_STL_VER to detect when the MSVC STL is being tested * Workaround C1XX __is_trivially_copyable bug llvm-svn: 302158
* Introduce VirtualUse. NFC.Michael Kruse2017-05-045-75/+525
| | | | | | | | | | | | | | | | | | | If a ScopStmt references a (scalar) value, there are multiple possibilities where this value can come. The decision about what kind of use it is must be handled consistently at different places, which can be error-prone. VirtualUse is meant to centralize the handling of the different types of value uses. This patch makes ScopBuilder and CodeGeneration use VirtualUse. This already helps to show inconsistencies with the value handling. In order to keep this patch NFC, exceptions to the general rules are added. These might be fixed later if they turn to problems. Overall, this should result in fewer post-codegen IR-verification errors, but instead assertion failures in `getNewValue` that are closer to the actual error. Differential Revision: https://reviews.llvm.org/D32667 llvm-svn: 302157
* clang-format: [JS] exponentiation operatorMartin Probst2017-05-043-0/+18
| | | | | | | | | | | | Summary: While its precedence should be higher than multiplicative, LLVM does not have a level for that, so for the time being just treat it as multiplicative. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D32864 llvm-svn: 302156
* Reduce code duplication. NFC.Rafael Espindola2017-05-044-12/+12
| | | | llvm-svn: 302155
* [globalisel][tablegen] Add several GINodeEquiv's for operators that do not ↵Daniel Sanders2017-05-041-10/+28
| | | | | | | | | | | | | | | | | | | require additional support. Summary: As of this patch, 350 out of 3938 rules are currently imported. Depends on D32229 Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar Reviewed By: ab Subscribers: dberris, llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D32275 llvm-svn: 302154
* [DAGCombine] Transform (fadd A, (fmul B, -2.0)) -> (fsub A, (fadd B, B)).Chad Rosier2017-05-043-4/+100
| | | | | | Differential Revision: http://reviews.llvm.org/D32596 llvm-svn: 302153
* [ASAN] Add interceptor for __longjmp_chkPeter Wu2017-05-043-0/+67
| | | | | | | | | | | | | | | | | Summary: glibc on Linux calls __longjmp_chk instead of longjmp (or _longjmp) when _FORTIFY_SOURCE is defined. Ensure that an ASAN-instrumented program intercepts this function when a system library calls it, otherwise the stack might remain poisoned and result in CHECK failures and false positives. Fixes https://github.com/google/sanitizers/issues/721 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D32408 llvm-svn: 302152
OpenPOWER on IntegriCloud