summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-mca] Propagate fatal llvm-mca errors from library classes to driver.Matt Davis2018-08-1317-70/+131
| | | | | | | | | | | | | | | | | Summary: This patch introduces error handling to propagate the errors from llvm-mca library classes (or what will become library classes) up to the driver. This patch also introduces an enum to make clearer the intention of the return value for Stage::execute. This supports PR38101. Reviewers: andreadb, courbet, RKSimon Reviewed By: andreadb Subscribers: llvm-commits, tschuett, gbedwell Differential Revision: https://reviews.llvm.org/D50561 llvm-svn: 339594
* [Sema] fix -Wfloat-conversion test case.Nick Desaulniers2018-08-131-1/+1
| | | | | | | | | | | | | | | | | | Summary: Fixes r339581 ("[SEMA] add more -Wfloat-conversion to compound assigment analysis"). This test case was caught in postsubmit testing. Reviewers: aaron.ballman, gkistanova Reviewed By: aaron.ballman Subscribers: cfe-commits, srhines Differential Revision: https://reviews.llvm.org/D50647 llvm-svn: 339593
* [clang-doc] Pass over function-internal declarationsJulie Hockett2018-08-137-1125/+713
| | | | llvm-svn: 339592
* [analyzer][UninitializedObjectChecker] Refactoring p1.: ImmutableList ↵Kristof Umann2018-08-131-7/+8
| | | | | | | | | | | | | | | | factory is no longer static This patch is the first part of a series of patches to refactor UninitializedObjectChecker. The goal of this effort is to Separate pointer chasing from the rest of the checker, Increase readability and reliability, Don't impact performance (too bad). In this one, ImmutableList's factory is moved to FindUninitializedFields. Differential Revision: https://reviews.llvm.org/D50503 llvm-svn: 339591
* [Documentation] Remove unnecessary placeholder, grammar fix in Release Notes.Eugene Zelenko2018-08-131-3/+1
| | | | llvm-svn: 339590
* [X86][BtVer2] Use NoSchedPredicate to model default transitions in variant ↵Andrea Di Biagio2018-08-131-8/+8
| | | | | | scheduling classes. NFC. llvm-svn: 339589
* [SimplifyLibCalls] reduce code for optimizeCos; NFCISanjay Patel2018-08-131-9/+8
| | | | llvm-svn: 339588
* Attempt to fix some MSVC build errors.Erik Pilkington2018-08-131-3/+3
| | | | llvm-svn: 339587
* [ADT] Implemented unittests for ImmutableListKristof Umann2018-08-133-1/+200
| | | | | | | | Also fixed a typo that wasn't discovered as `create` was never instantiated. Differential Revision: https://reviews.llvm.org/D50646 llvm-svn: 339586
* [OMPT] Make omp_control_tool() compliant when called from Fortran programsJonathan Peyton2018-08-132-2/+4
| | | | | | | | | | | | | | This change fixes an incorrect behavior of the omp_control_tool function when called from Fortran applications. A tool callback function for this event is supposed to get NULL for the third argument according to the specification, but the current implementation just passes a garbage value. A possible fix is to use the OPTIONAL attribute for the third argument. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D50565 llvm-svn: 339585
* [InstCombine] Limit simplifyAllocaArraySize constant folding to values that ↵Simon Pilgrim2018-08-132-24/+42
| | | | | | | | fit into a uint64_t Fixes OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5223 llvm-svn: 339584
* Straight forward FastDemangle replacement in SubsPrimitiveParmItaniumStefan Granitz2018-08-132-38/+58
| | | | | | | | | | | | | | | | | | | Summary: Removing FastDemangle will greatly reduce maintenance efforts. This patch replaces the last point of use in LLDB. Semantics should be kept intact. Once this is agreed upon, we can: * Remove the FastDemangle sources * Add more features e.g. substitutions in template parameters, considering all variations, etc. Depends on LLVM patch https://reviews.llvm.org/D50586 Reviewers: erik.pilkington, friss, jingham, JDevlieghere Subscribers: kristof.beyls, chrib, lldb-commits Differential Revision: https://reviews.llvm.org/D50587 llvm-svn: 339583
* [AST] Update/correct the static_asserts for the bit-fields in TypeBruno Ricci2018-08-131-2/+21
| | | | | | | | | | | | | | | | The current static_assert only checks that ObjCObjectTypeBitfields fits into an unsigned. However it turns out that FunctionTypeBitfields do not currently fits into an unsigned. Therefore the anonymous union containing the bit-fields always use 8 bytes instead of 4. This patch removes the lone misguided static_assert and systematically checks the size of each bit-field. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D50630 llvm-svn: 339582
* [SEMA] add more -Wfloat-conversion to compound assigment analysisNick Desaulniers2018-08-132-27/+59
| | | | | | | | | | | | | | Summary: Fixes Bug: https://bugs.llvm.org/show_bug.cgi?id=27061 Reviewers: aaron.ballman, acoomans Reviewed By: aaron.ballman, acoomans Subscribers: acoomans, cfe-commits, srhines, pirama Differential Revision: https://reviews.llvm.org/D50467 llvm-svn: 339581
* [itanium demangler] Add llvm::itaniumFindTypesInMangledName()Erik Pilkington2018-08-136-3/+64
| | | | | | | | | | | | This function calls a callback whenever a <type> is parsed. This is necessary to implement FindAlternateFunctionManglings in LLDB, which uses a similar hack in FastDemangle. Once that function has been updated to use this version, FastDemangle can finally be removed. Differential revision: https://reviews.llvm.org/D50586 llvm-svn: 339580
* [InstCombine] auto-generate full checks and add cos intrinsic test; NFCSanjay Patel2018-08-131-17/+34
| | | | llvm-svn: 339579
* [SLC] Expand simplification of pow() for vector typesEvandro Menezes2018-08-134-101/+99
| | | | | | | | Also consider vector constants when simplifying `pow()`. Differential revision: https://reviews.llvm.org/D50035 llvm-svn: 339578
* [Tablegen] Replace uses of formatted_raw_ostream with raw_ostream in the ↵Andrea Di Biagio2018-08-134-137/+134
| | | | | | | | | | | | | | | | | | | | | | predicate expander. NFCI This is a follow-up of r339552. As pointed out by Craig in D50566, we don't need a formatted_raw_ostream to indent strings. We can use instead raw_ostream::indent(). Internally, class PredicateExpander already keeps track of the current indentation level. Also, the grammar for predicates is well parenthesized, and therefore we don't need to use a formatted_raw_ostream to continuously track the column number. Instead we can safely replace all the uses of formatted_raw_ostream::PadToColumn() with uses of raw_ostream::indent(). By replacing formatted_raw_ostream with a simpler raw_ostream, we also avoid the implicit check on the newline character on every print to stream. No functional change intended. llvm-svn: 339577
* [Hexagon] Silence -Wuninitialized warning from GCC 5.4, NFCKrzysztof Parzyszek2018-08-131-0/+4
| | | | | | | | Patch by Kim Gräsman. Differential Revision: https://reviews.llvm.org/D50623 llvm-svn: 339576
* [sanitizer] Remove st(X) from the clobber list in 32-bit x86 atomicsKostya Kortchinsky2018-08-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When compiling with `WERROR=ON` & a recent clang, having the `st(?)` registers in the clobber list produces a fatal error (except `st(7)` for some reason): ``` .../sanitizer_common/sanitizer_atomic_clang_x86.h:98:9: error: inline asm clobber list contains reserved registers: ST0, ST1, ST2, ST3, ST4, ST5, ST6 [-Werror,-Winline-asm] "movq %1, %%mm0;" // Use mmx reg for 64-bit atomic moves ^ <inline asm>:1:1: note: instantiated into assembly here movq 8(%esp), %mm0;movq %mm0, (%esi);emms; ^ .../sanitizer_common/sanitizer_atomic_clang_x86.h:98:9: note: Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour. "movq %1, %%mm0;" // Use mmx reg for 64-bit atomic moves ^ <inline asm>:1:1: note: instantiated into assembly here movq 8(%esp), %mm0;movq %mm0, (%esi);emms; ^ ``` As far as I can tell, they were in there due to the use of the `emms` instruction, but removing the clobber doesn't appear to have a functional impact. I am unsure if there is a better way to address this. Reviewers: eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, delcypher, jfb, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D50562 llvm-svn: 339575
* Revert "[OPENMP] Fix emission of the loop doacross constructs."Alexey Bataev2018-08-1311-540/+216
| | | | | | This reverts commit r339568 because of the problems with the buildbots. llvm-svn: 339574
* [clang-format] Fix comment, NFCKrasimir Georgiev2018-08-131-1/+1
| | | | llvm-svn: 339573
* Fix lint tests for D50449Kadir Cetinkaya2018-08-132-0/+39
| | | | | | | | | | | | Reviewers: ilya-biryukov, hokein Reviewed By: hokein Subscribers: hokein, ioeric, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50635 llvm-svn: 339572
* [clang-tidy] Recognize [[clang::reinitializes]] attribute in ↵Martin Bohme2018-08-133-0/+42
| | | | | | | | | | | | | | | | | | | | | | | bugprone-use-after-move Summary: This allows member functions to be marked as reinitializing the object. After a moved-from object has been reinitialized, the check will no longer consider it to be in an indeterminate state. The patch that adds the attribute itself is at https://reviews.llvm.org/D49911 Reviewers: ilya-biryukov, aaron.ballman, alexfh, hokein, rsmith Reviewed By: aaron.ballman Subscribers: dblaikie, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D49910 llvm-svn: 339571
* Revert "[Sparc] Add support for the cycle counter available in GR740"Daniel Cederman2018-08-136-32/+2
| | | | | | | It breaks when using EXPENSIVE_CHECKS with the error message "Bad machine code: Using an undefined physical register". llvm-svn: 339570
* Summary:Add clang::reinitializes attributeMartin Bohme2018-08-134-0/+59
| | | | | | | | | | | | | | | | Summary: This is for use by clang-tidy's bugprone-use-after-move check -- see corresponding clang-tidy patch at https://reviews.llvm.org/D49910. Reviewers: aaron.ballman, rsmith Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49911 llvm-svn: 339569
* [OPENMP] Fix emission of the loop doacross constructs.Alexey Bataev2018-08-1311-216/+540
| | | | | | | The number of loops associated with the OpenMP loop constructs should not be considered as the number loops to collapse. llvm-svn: 339568
* Check for tied operandsSid Manning2018-08-132-0/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D50592 llvm-svn: 339567
* [LLD][ELF] - Remove dead code from handleTlsRelocation. NFC.George Rimar2018-08-131-2/+0
| | | | | | | | Code is dead because R_TLSDESC_CALL is already handled in the following block of the code: https://github.com/llvm-mirror/lld/blob/master/ELF/Relocations.cpp#L231 llvm-svn: 339566
* [SystemZ] Increase the amount of inlining.Jonas Paulsson2018-08-131-0/+2
| | | | | | | Implement getInliningThresholdMultiplier() and have it return 3. Review: Ulrich Weigand llvm-svn: 339563
* [X86] Add tests showing missing div/rem 0, X -> 0 combinesSimon Pilgrim2018-08-134-0/+270
| | | | llvm-svn: 339562
* [DAGCombiner] simplifyDivRem - add comment describing divide by undef/zero ↵Simon Pilgrim2018-08-131-0/+5
| | | | | | combine. NFC. llvm-svn: 339561
* [ASTImporter] Improved import of friend templates.Balazs Keri2018-08-132-10/+123
| | | | | | | | | | | | | | | | | | | Summary: When importing a friend class template declaration, this declaration should not be merged with any other existing declaration for the same type. Otherwise the getFriendDecl of the FriendDecl can point to an other already referenced declaration, this case causes problems. Additionally the previous decl of class templates is set at import. Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50516 llvm-svn: 339560
* [CMake] Fix bug in `add_weak_symbols()` function.Dan Liew2018-08-131-1/+9
| | | | | | | | | | | | | Previously the the `weak_symbols.txt` files could be modified and the build system wouldn't update the link flags automatically. Instead the developer had to know to reconfigure CMake manually. This is now fixed by telling CMake that the file being used to read weak symbols from is a configure-time dependency. Differential Revision: https://reviews.llvm.org/D50059 llvm-svn: 339559
* Revert "Allow relockable scopes with thread safety attributes."Haojian Wu2018-08-132-216/+14
| | | | | | | | | | | | | | | | | | | | | | This reverts commit r339456. The change introduces a new crash, see class SCOPED_LOCKABLE FileLock { public: explicit FileLock() EXCLUSIVE_LOCK_FUNCTION(file_); ~FileLock() UNLOCK_FUNCTION(file_); void Lock() EXCLUSIVE_LOCK_FUNCTION(file_); Mutex file_; }; void relockShared2() { FileLock file_lock; file_lock.Lock(); } llvm-svn: 339558
* Fix MSVC 'std::min: no matching overloaded function found' error.Simon Pilgrim2018-08-131-1/+2
| | | | llvm-svn: 339557
* [CGP] Fix GEP issue with out of range APInt constant values not fitting in ↵Simon Pilgrim2018-08-132-2/+18
| | | | | | | | int64_t Test case reduced from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7173 llvm-svn: 339556
* [LLD][ELF] - Remove dead code from handleTlsRelocation. NFC.George Rimar2018-08-131-3/+0
| | | | | | | | | | That piece of code is really very old and "protected" from TLS relocations against symbol in non-allocatable sections. It is useless because normally non-alloc sections have relocations with allocatable targets, but not the reverse. And so the code was simply dead. llvm-svn: 339553
* [Tablegen][SubtargetEmitter] Improve expansion of predicates of a variant ↵Andrea Di Biagio2018-08-132-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheduling class. This patch refactors the logic that expands predicates of a variant scheduling class. The idea is to improve the readability of the auto-generated code by removing redundant parentheses around predicate expressions, and by removing redundant if(true) statements. This patch replaces the definition of NoSchedPred in TargetSchedule.td with an instance of MCSchedPredicate. The new definition is sematically equivalent to the previous one. The main difference is that now SubtargetEmitter knows that it represents predicate "true". Before this patch, we always generated an if (true) for the default transition of a variant scheduling class. Example (taken from AArch64GenSubtargetInfo.inc) : ``` if (SchedModel->getProcessorID() == 3) { // CycloneModel if ((TII->isScaledAddr(*MI))) return 927; // (WriteIS_WriteLD)_ReadBaseRS if ((true)) return 928; // WriteLD_ReadDefault } ``` Extra parentheses were also generated around the predicate expressions. With this patch, we get the following auto-generated checks: ``` if (SchedModel->getProcessorID() == 3) { // CycloneModel if (TII->isScaledAddr(*MI)) return 927; // (WriteIS_WriteLD)_ReadBaseRS return 928; // WriteLD_ReadDefault } ``` The new auto-generated code behaves exactly the same as before. So, technically this is a non functional change. Differential revision: https://reviews.llvm.org/D50566 llvm-svn: 339552
* [Sparc] Add support for the cycle counter available in GR740Daniel Cederman2018-08-136-2/+32
| | | | | | | | | | | | | | | | | | Summary: The GR740 provides an up cycle counter in the registers ASR22 and ASR23. As these registers can not be read together atomically we only use the value of ASR23 for llvm.readcyclecounter(). The ASR23 register holds the 32 LSBs of the up-counter. Reviewers: jyknight, venkatra Reviewed By: jyknight Subscribers: fedor.sergeev, jrtc27, llvm-commits Differential Revision: https://reviews.llvm.org/D48638 llvm-svn: 339551
* [LLD][ELF] - Update test case to check the error message reported. NFC.George Rimar2018-08-131-1/+6
| | | | | | | | | | This updates znotext-plt-relocations-protected.s test case (adds a file symbol) to check how the error message is built. It allows to cover/test the following line: https://github.com/llvm-mirror/lld/blob/master/ELF/Relocations.cpp#L79 llvm-svn: 339550
* Remove extra semicolon (fixes -Wpedantic warning). NFCI.Simon Pilgrim2018-08-131-1/+1
| | | | llvm-svn: 339549
* [clangd] Generate incomplete trigrams for the Dex indexKirill Bobyrev2018-08-134-58/+118
| | | | | | | | | | | | | | This patch handles trigram generation "short" identifiers and queries. Trigram generator produces incomplete trigrams for short names so that the same query iterator API can be used to match symbols which don't have enough symbols to form a trigram and correctly handle queries which also are not sufficient for generating a full trigram. Reviewed by: ioeric Differential revision: https://reviews.llvm.org/D50517 llvm-svn: 339548
* [clangd] Introduce scoring mechanism for SignatureInformations.Kadir Cetinkaya2018-08-134-11/+100
| | | | | | | | | | | | Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: mgrang, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50555 llvm-svn: 339547
* [ARM] Added FP16 VREV Vector Instrinsic CodeGen supportLuke Geeson2018-08-132-13/+13
| | | | llvm-svn: 339546
* [clangd] Support textEdit in addition to insertText.Kadir Cetinkaya2018-08-136-7/+145
| | | | | | | | | | | | | | | | Summary: Completion replies contains textEdits as well. Note that this change relies on https://reviews.llvm.org/D50443. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: mgrang, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50449 llvm-svn: 339543
* [clang] Store code completion token range in preprocessor.Kadir Cetinkaya2018-08-132-0/+14
| | | | | | | | | | | | | | | | | Summary: This change is to support a new fature in clangd, tests will be send toclang-tools-extra with that change. Unittests are included in: https://reviews.llvm.org/D50449 Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50443 llvm-svn: 339540
* [GuardWidening] Widen very likely non-taken br instructionsMax Kazantsev2018-08-132-26/+506
| | | | | | | | | | This is a second part of D49974 that handles widening of conditional branches that have very likely `false` branch. Differential Revision: https://reviews.llvm.org/D50040 Reviewed By: reames llvm-svn: 339537
* [SelectionDAG] In PromoteFloatOp_BITCAST, insert a bitcast after the ↵Craig Topper2018-08-132-20/+58
| | | | | | | | fp_to_fp16 in case the result type isn't a scalar integer. This is another variation of PR38533. In this case, the result type of the bitcast is legal and 16-bits wide, but not a scalar integer. So we need to emit the convert to i16 and then bitcast it to the true result type. This new bitcast will be further type legalized if necessary. llvm-svn: 339536
* [SelectionDAG] In PromoteIntRes_BITCAST, when the input is TypePromoteFloat, ↵Craig Topper2018-08-132-2/+21
| | | | | | | | | | make sure the output type is scalar. For vectors, use a store and load of temporary. Previously if the result type was a vector, we emitted a FP_TO_FP16 with a vector result type which isn't valid. This is basically the opposite case of the root cause of PR38533. llvm-svn: 339535
OpenPOWER on IntegriCloud