summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* In the below scenario, we must be able to skip the a DBG_VALUE instruction andSumanth Gundapaneni2017-01-091-3/+8
| | | | | | | | | | | | | | | remove the dead store. %vreg0<def> = L2_loadri_io <fi#15>, 0; mem:LD4[%dataF](align=4) DBG_VALUE %vreg0, %noreg, !"dataF", <!184>; IntRegs:%vreg0 S2_storeri_io <fi#15>, 0, %vreg0; mem:ST4[%dataF] In reality, this kind of stores are eliminated before Stack Slot Coloring pass, possibly in instruction lowering Differential Revision: https://reviews.llvm.org/D26616 llvm-svn: 291455
* [compiler-rt] Include <dlfcn.h> unconditionallyKuba Mracek2017-01-091-3/+0
| | | | | | | | This fixes a build issue with musl-libc. Differential Revision: https://reviews.llvm.org/D21656 llvm-svn: 291454
* [MS] Mark default args of exported default constructors as usedReid Kleckner2017-01-092-2/+39
| | | | | | | | | | Fixes a regression introduced in r291045, which would lead to link errors. While we should no longer encounter unparsed or uninstantiated default arguments in this codepath, we still need to call CheckCXXDefaultArgExpr to mark the default argument expressions as ODR-used. llvm-svn: 291453
* Split dllexport default constructor closure tests out into a separate fileReid Kleckner2017-01-092-57/+63
| | | | | | test/CodeGenCXX/dllexport.cpp has grown quite large at this point. NFC llvm-svn: 291452
* [X86][AVX512] Enable v16i8/v32i8 vector shifts to use an ↵Simon Pilgrim2017-01-097-332/+296
| | | | | | | | | | extend+shift+truncate pattern. Use the existing AVX2 v8i16 vector shift lowering for v16i8 (extending to v16i32) on AVX512 targets and v32i8 (extending to v32i16) on AVX512BW targets. Cost model updates to follow. llvm-svn: 291451
* Follow up to r291448: use isStructorDecl in one more placeReid Kleckner2017-01-091-1/+1
| | | | | | | This pointer comparison has shown to be error-prone, so use the standard helper for it. NFC llvm-svn: 291450
* [clang] Enable using --section-ordering-file option of ld.goldAlexander Shaposhnikov2017-01-091-8/+12
| | | | | | | | | This diffs enables using --section-ordering-file option of ld.gold via the variable CLANG_ORDER_FILE. Differential revision: https://reviews.llvm.org/D28461 llvm-svn: 291449
* [MS] Fix function type mangling of default ctor closuresReid Kleckner2017-01-092-6/+16
| | | | | | | | | Use the canonical decl in pointer comparisons with the default constructor closure decl. Otherwise we don't produce the correct "@@QAEXXZ" mangling, which essentially means "void(void) thiscall public instance method". llvm-svn: 291448
* fix comment typos; NFCSanjay Patel2017-01-092-7/+7
| | | | llvm-svn: 291447
* [include-fixer] Load symbol index asynchronously.Benjamin Kramer2017-01-095-41/+52
| | | | | | | | We don't actually need the index until parse time, so fetch it in the background and start parsing. By the time it is actually needed it's likely that the loading phase has completed in the background. llvm-svn: 291446
* [X86][AVX512DQ] Enable v16i16 vector shifts to use an extend+shift+truncate ↵Simon Pilgrim2017-01-097-148/+60
| | | | | | | | | | pattern. Use the existing AVX2 v8i16 vector shift lowering for v16i16 on AVX512 targets (AVX512BW will have already have lowered with vpsravw). Cost model updates to follow. llvm-svn: 291445
* [X86][AVX512DQ] Added AVX512DQ to 128/256 bit vector shift testsSimon Pilgrim2017-01-096-84/+215
| | | | llvm-svn: 291444
* [IR] Adding const_value_op_iterator for IR/User.hMohammed Agabaria2017-01-092-0/+45
| | | | | | | | const value op iterator is missing from User.h class. Differential Revision: https://reviews.llvm.org/D28464 llvm-svn: 291443
* Some formatting in TargetMachineC. NFCAmaury Sechet2017-01-091-2/+2
| | | | llvm-svn: 291442
* [SelectionDAG] Fix in legalization of UMAX/SMAX/UMIN/SMIN. Solves PR31486.Bjorn Pettersson2017-01-092-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Originally i64 = umax t8, Constant:i64<4> was expanded into i32,i32 = umax Constant:i32<0>, Constant:i32<0> i32,i32 = umax t7, Constant:i32<4> Now instead the two produced umax:es return i32 instead of i32, i32. Thanks to Jan Vesely for help with the test case. Patch by mikael.holmen at ericsson.com Reviewers: bogner, jvesely, tstellarAMD, arsenm Subscribers: test, wdng, RKSimon, arsenm, nhaehnle, llvm-commits Differential Revision: https://reviews.llvm.org/D28135 llvm-svn: 291441
* [libcxxabi] Cleanup and adapt for r291275. NFC.Asiri Rathnayake2017-01-094-45/+28
| | | | | | | | | | | + Now that libcxxabi shares the same threading API as libcxx, a whole chunk of code in src/config.h is made redundant (I missed this earlier). + r291275 split off the externalized-thread-api libcxx configuration from the external-thread-library libcxx configuration. libcxxabi should follow the same approach. llvm-svn: 291440
* [cxx1z-constexpr-lambda] [NFC] Add a FIXME to reinstate certain restrictions ↵Faisal Vali2017-01-091-0/+6
| | | | | | | | | | | | on constexpr lambdas from appearing within function-signatures (CWG1607) For further background, see Richard's comments: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20170109/181998.html A patch to fix this is being worked on. Thanks! llvm-svn: 291439
* RuntimeDyldELF: add missing test cases for AArch64Eugene Leviant2017-01-092-3/+43
| | | | llvm-svn: 291438
* Use the same ABI logic for AArch64 Big Endian as in other placesJoerg Sonnenberger2017-01-091-1/+2
| | | | | | covering polys. llvm-svn: 291437
* Extend NetBSD/AArch64 to cover Big Endian as well.Joerg Sonnenberger2017-01-094-0/+78
| | | | llvm-svn: 291436
* Fix MSVC build failure introduced in r291431Pavel Labath2017-01-091-4/+3
| | | | | | | MSVC does not like to reinterpret_cast to a uint64_t. Use a different cast instead. llvm-svn: 291435
* clang-format: Improve support for override/final as variable names.Daniel Jasper2017-01-092-6/+8
| | | | | | | | | | | | | | | | Before: bool a = f() &&override.f(); bool a = f() &&final.f(); void f(const MyOverride & override); void f(const MyFinal & final); After: bool a = f() && override.f(); bool a = f() && final.f(); void f(const MyOverride &override); void f(const MyFinal &final); llvm-svn: 291434
* [libcxx] Fix externally-threaded shared library builds after r291275.Asiri Rathnayake2017-01-091-11/+12
| | | | | | | | | | Need to allow unresolved symbols in the dylib. This was previously done for LIBCXX_HAS_EXTERNAL_THREAD_API, but we have since split that into two with LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY being the externally-threaded variant. Also a minor CMakeLists.txt cleanup. llvm-svn: 291433
* [lld][cmake] Fix LLVM_LINK_LLVM_DYLIB buildPavel Labath2017-01-098-16/+29
| | | | | | | | | | | | | | | | | | | | | | | Summary: Lld's build had a couple of issues which prevented a successfull LLVM_LINK_LLVM_DYLIB compilation. - add_llvm_library vs llvm_add_library: One adds a library to libLLVM.so, other one doesn't. Lld was using the wrong one, causing symbols to be mupltiply defined in things linking to libLLVM. - confusion when to use LINK_LIBS vs LINK_COMPONENTS in llvm_add_library - not using LLVM_LINK_COMPONENTS for add_lld_tool With these fixes lld compiles and it's test suite passes both in LLVM_LINK_LLVM_DYLIB mode and without it. Reviewers: ruiu, beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28397 llvm-svn: 291432
* RuntimeDyldELF: don't create thunk if not neededEugene Leviant2017-01-093-1/+61
| | | | | | | | | | | | | This patch doesn't create thunk for branch operation when following conditions are met: - Architecture is AArch64 - Relocation target is in the same object file - Relocation target is close enough to be encoded in immediate offset In such case we branch directly to the target instead of branching to thunk Differential revision: https://reviews.llvm.org/D28108 llvm-svn: 291431
* [analyzer] Add checker for iterators dereferenced beyond their range.Gabor Horvath2017-01-098-9/+1125
| | | | | | | | Patch by: Adam Balogh! Differential Revision: https://reviews.llvm.org/D25660 llvm-svn: 291430
* clang-format: [JS] fix broken test.Martin Probst2017-01-091-1/+3
| | | | llvm-svn: 291429
* clang-format: [JS] ASI after importsMartin Probst2017-01-092-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Automatic semicolon insertion should break import and export statements: Before, this would format on one line: // Note: no semi after 'x' below! import {x} from 'x' export function foo() {} Into: import {x} from 'x' export function foo() {} With this change, the statements get separated. This also improves automatic semicolon insertion to consider closing braces preceding declarations and statements. Reviewers: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28465 llvm-svn: 291428
* Implement C++ DR1391 (wg21.link/cwg1391)Richard Smith2017-01-0913-147/+400
| | | | | | | | | | | | | | Check for implicit conversion sequences for non-dependent function template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation. This re-commits r290808, reverted in r290811 and r291412, with a couple of fixes for handling of explicitly-specified non-trailing template argument packs. llvm-svn: 291427
* [PM] Teach SCEV to invalidate itself when its dependencies becomeChandler Carruth2017-01-093-0/+84
| | | | | | | | | | | | | invalid. This fixes use-after-free bugs that will arise with any interesting use of SCEV. I've added a dedicated test that works diligently to trigger these kinds of bugs in the new pass manager and also checks for them explicitly as well as triggering ASan failures when things go squirly. llvm-svn: 291426
* Implement DR1388 (wg21.link/cwg1388).Richard Smith2017-01-095-41/+135
| | | | | | | | | | | | This issue clarifies how deduction proceeds past a non-trailing function parameter pack. Essentially, the pack itself is skipped and consumes no arguments (except for those implied by an explicitly-specified template arguments), and nothing is deduced from it. As a small fix to the standard's rule, we do not allow subsequent deduction to change the length of the function parameter pack (by preventing extension of the explicitly-specified pack if present, and otherwise deducing all contained packs to empty packs). llvm-svn: 291425
* [WebAssembly] Fix the opcode values for i64.eq and i64.ne.Dan Gohman2017-01-091-2/+2
| | | | llvm-svn: 291424
* Remove unused method in LoopVectorize.cpp.Jonas Paulsson2017-01-091-7/+0
| | | | | | | computeInterleaveCount() is not defined/used and is therefore removed. Review: Davide Italiano llvm-svn: 291423
* Add release notes for `diagnose_if`George Burgess IV2017-01-091-0/+4
| | | | | | | Bots seem happy with `diagnose_if` so far, so I'm optimistically adding release notes for it. llvm-svn: 291422
* NewGVN: Fix PR 31573, a failure to verify memory congruency due toDaniel Berlin2017-01-092-1/+56
| | | | | | | not excluding ourselves when checking if any equivalent stores exist. llvm-svn: 291421
* NewGVN: Change a std::vector to SmallVector and cleanup naming.Daniel Berlin2017-01-091-10/+11
| | | | llvm-svn: 291420
* [AVX-512] Change another pattern that was using BLENDM to use masked moves. ↵Craig Topper2017-01-093-38/+47
| | | | | | A future patch will conver it back to BLENDM if its beneficial to register allocation. llvm-svn: 291419
* Add the diagnose_if attribute to clang.George Burgess IV2017-01-0917-169/+1282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `diagnose_if` can be used to have clang emit either warnings or errors for function calls that meet user-specified conditions. For example: ``` constexpr int foo(int a) __attribute__((diagnose_if(a > 10, "configurations with a > 10 are " "expensive.", "warning"))); int f1 = foo(9); int f2 = foo(10); // warning: configuration with a > 10 are expensive. int f3 = foo(f2); ``` It currently only emits diagnostics in cases where the condition is guaranteed to always be true. So, the following code will emit no warnings: ``` constexpr int bar(int a) { foo(a); return 0; } constexpr int i = bar(10); ``` We hope to support optionally emitting diagnostics for cases like that (and emitting runtime checks) in the future. Release notes will appear shortly. :) Differential Revision: https://reviews.llvm.org/D27424 llvm-svn: 291418
* Enable weak hooks on darwinFrancis Ricci2017-01-0912-3/+58
| | | | | | | | | | | | | | | | Summary: By default, darwin requires a definition for weak interface functions at link time. Adding the '-U' link flag with each weak function allows these weak interface functions to be used without definitions, which mirrors behavior on linux and windows. Reviewers: compnerd, eugenis Subscribers: kubabrecka, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28203 llvm-svn: 291417
* [cxx1z-constexpr-lambda] Implement constant evaluation of non-capturing ↵Faisal Vali2017-01-093-2/+100
| | | | | | | | | | | | | | | lambda expressions. Add a visitor for lambda expressions to RecordExprEvaluator in ExprConstant.cpp that creates an empty APValue of Struct type to represent the closure object. Additionally, add a LambdaExpr visitor to the TemporaryExprEvaluator that forwards constant evaluation of immediately-called-lambda-expressions to the one in RecordExprEvaluator through VisitConstructExpr. This patch supports: constexpr auto ID = [] (auto a) { return a; }; static_assert(ID(3.14) == 3.14); static_assert([](auto a) { return a + 1; }(10) == 11); Lambda captures are still not supported for constexpr lambdas. llvm-svn: 291416
* [AVX-512] Add patterns to use a zero masked VPTERNLOG instruction for ↵Craig Topper2017-01-0913-217/+184
| | | | | | | | vselects of all ones and all zeros. Previously we emitted a VPTERNLOG and a separate masked move. llvm-svn: 291415
* Define sys::path::convert_to_slashRui Ueyama2017-01-095-24/+21
| | | | | | | | This patch moves convertToUnixPathSeparator from LLD to LLVM. Differential Revision: https://reviews.llvm.org/D28444 llvm-svn: 291414
* Add linker-script-included files to reproduce tar files.Rui Ueyama2017-01-096-36/+48
| | | | | | | | Previously, files added using INCLUDE directive weren't added to reproduce archives. In this patch, I defined a function to open a file and use that from Driver and LinkerScript. llvm-svn: 291413
* Revert r291410 and r291411.Richard Smith2017-01-0912-387/+143
| | | | | | The test-suite bots are still failing even after r291410's fix. llvm-svn: 291412
* Fix test for targets whose preferred spelling for an 8-byte int is 'long ↵Richard Smith2017-01-091-1/+1
| | | | | | long', not 'long'. llvm-svn: 291411
* Implement C++ DR1391 (wg21.link/cwg1391)Richard Smith2017-01-0912-143/+387
| | | | | | | | | | | | | Check for implicit conversion sequences for non-dependent function template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation. This re-commits r290808, reverted in r290811, with a fix for handling of explicitly-specified template argument packs. llvm-svn: 291410
* [index] Introduce SymbolSubKind for reporting language-specific details.Argyrios Kyrtzidis2017-01-084-1/+39
| | | | | | Initially reports if a constructor symbol is a copy or move constructor. llvm-svn: 291409
* Use the correct ObjC EH personalityBenjamin Kramer2017-01-082-0/+10
| | | | | | | | This fixes ObjC exceptions on Win64 (which uses SEH), among others. Patch by Jonathan Schleifer! llvm-svn: 291408
* PR31514: Add recursive self-instantiation check during template argumentRichard Smith2017-01-083-32/+55
| | | | | | | | | | | deduction in partial ordering. This prevents us from crashing due to attempting to instantiate the same class template specialization definition multiple times. (Debug builds also appear to sometimes hit the stack limit before hitting the instantiation depth limit in this case.) llvm-svn: 291407
* CommandLine option: Relax the assertion introduced in r290467 to allows for ↵Mehdi Amini2017-01-081-1/+1
| | | | | | | | | empty string This is used in LDC for custom boolean commandline options, setArgStr is called with an empty string before using AddLiteralOption. llvm-svn: 291406
OpenPOWER on IntegriCloud