summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [NFC][InstCombine] Add shift amount reassociation in bittest miscompile ↵Roman Lebedev2020-02-271-0/+17
| | | | | | | example from PR44802 https://bugs.llvm.org/show_bug.cgi?id=44802 (cherry picked from commit 6f807ca00d951d3e74f7ea4fe1daa8e3560f4c0d)
* [InstCombine] reassociateShiftAmtsOfTwoSameDirectionShifts(): fix miscompile ↵Roman Lebedev2020-02-272-4/+27
| | | | | | | | | | | | | | | | | | | (PR44802) As input, we have the following pattern: Sh0 (Sh1 X, Q), K We want to rewrite that as: Sh x, (Q+K) iff (Q+K) u< bitwidth(x) While we know that originally (Q+K) would not overflow (because 2 * (N-1) u<= iN -1), we may have looked past extensions of shift amounts. so it may now overflow in smaller bitwidth. To ensure that does not happen, we need to ensure that the total maximal shift amount is still representable in that smaller bitwidth. If the overflow would happen, (Q+K) u< bitwidth(x) check would be bogus. https://bugs.llvm.org/show_bug.cgi?id=44802 (cherry picked from commit 781d077afb0ed9771c513d064c40170c1ccd21c9)
* [NFC][InstCombine] Add shift amount reassociation miscompile example from ↵Roman Lebedev2020-02-271-0/+15
| | | | | | | PR44802 https://bugs.llvm.org/show_bug.cgi?id=44802 (cherry picked from commit 425ef999385058143bb927aefe81daddcd43f623)
* [ReleaseNotes] Mention freeze instructionJuneyoung Lee2020-02-271-2/+6
| | | | | | | | | | Reviewers: hans, nlopes, regehr Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75226
* [ASTMatchers] HasNameMatcher handles `extern "C"`Nathan James2020-02-272-1/+22
| | | | | | | | | | | | | | | | Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=42193 | hasName AST matcher is confused by extern "C" in namespace. ]] Reviewers: klimek, aaron.ballman, gribozavr2 Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75202 (cherry picked from commit 16cabf278fc8c14d415e677ce0bc40d46a6de30d)
* [MC][ARM] Resolve some pcrel fixups at assembly time (PR44929)Hans Wennborg2020-02-276-17/+41
| | | | | | | | | | | | MC currently does not emit these relocation types, and lld does not handle them. Add FKF_Constant as a work-around of some ARM code after D72197. Eventually we probably should implement these relocation types. By Fangrui Song! Differential revision: https://reviews.llvm.org/D72892 (cherry picked from commit 2e24219d3cbfcb8c824c58872f97de0a2e94a7c8)
* [MemorySSA] Don't verify MemorySSA unless VerifyMemorySSA enabledNikita Popov2020-02-271-1/+4
| | | | | | | | | | | MemorySSA is often taking up an unreasonable fraction of runtime in assertion enabled builds. Turns out that there is one code-path that runs verifyMemorySSA() even if VerifyMemorySSA is not enabled. This patch makes it conditional as well. Differential Revision: https://reviews.llvm.org/D74505 (cherry picked from commit f0b57d8071853ec2ab459c0492854c67ea4fa93c)
* Revert "[Polly][docs] Polly release notes."Hans Wennborg2020-02-261-41/+1
| | | | | | It no longer applies after d7afdb596e865c11b853d8c5df7d96d594170e1c. This reverts commit 002af0119286297dbd76b08a4a6cc4b6b87d3f26.
* [CMake] Default to static linking for subprojects.Michael Kruse2020-02-262-2/+14
| | | | | | | | | | | | | | | | Pass plugins introduced in D61446 do not support dynamic linking on Windows, hence the option LLVM_${name_upper}_LINK_INTO_TOOLS can only work being set to "ON". Currently, it defaults to "OFF" such that such plugins are inoperable by default on Windows. Change the default for subprojects to follow LLVM_ENABLE_PROJECTS. Reviewed By: serge-sans-paille, MaskRay Differential Revision: https://reviews.llvm.org/D72372 (cherry picked from commit 6369b9bf31188bdd472299252deb6db3f650864b) This is for PR45001.
* [RISCV] Add Clang and LLVM Release NotesSam Elliott2020-02-262-0/+80
|
* [ReleaseNotes] Mention new matrix intrinsics.Florian Hahn2020-02-262-0/+9
| | | | | | | | Reviewers: anemet, Gerolf Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D75161
* Revert "[LICM] Support hosting of dynamic allocas out of loops"Philip Reames2020-02-262-213/+0
| | | | | | | | This reverts commit 8d22100f66c4170510c6ff028c60672acfe1cff9. There was a functional regression reported (https://bugs.llvm.org/show_bug.cgi?id=44996). I'm not actually sure the patch is wrong, but I don't have time to investigate currently, and this line of work isn't something I'm likely to get back to quickly. (cherry picked from commit 14845b2c459021e3dbf2ead52d707d4a7db40cbb)
* Put microsoft template parameter shadow warning behind separate flag (PR44794)Hans Wennborg2020-02-263-2/+14
| | | | | | Differential revision: https://reviews.llvm.org/D75121 (cherry picked from commit 41a6612ea8afc5254e4de3aca55628d37f0be433)
* [Codegen] Revert rL354676/rL354677 and followups - introduced PR43446 miscompileRoman Lebedev2020-02-267-40/+67
| | | | | | | | | | This reverts https://reviews.llvm.org/D58468 (rL354676, 44037d7a6377ec8e5542cced73583283334b516b), and all and any follow-ups to that code block. https://bugs.llvm.org/show_bug.cgi?id=43446 (cherry picked from commit d20907d1de89bf63b589fadd8c096d4895e47fba)
* Revert "[compiler-rt] Add a critical section when flushing gcov counters"Hans Wennborg2020-02-261-24/+1
| | | | | | See the discussion on PR44792. This reverts commit 02ce9d8ef5a84bc884de4105eae5f8736ef67634.
* [remark][diagnostics] [codegen] Fix PR44896Rong Xu2020-02-264-1/+30
| | | | | | | | | | | | | | | | | This patch fixes PR44896. For IR input files, option fdiscard-value-names should be ignored as we need named values in loadModule(). Commit 60d3947922 sets this option after loadModule() where valued names already created. This creates an inconsistent state in setNameImpl() that leads to a seg fault. This patch forces fdiscard-value-names to be false for IR input files. This patch also emits a warning of "ignoring -fdiscard-value-names" if option fdiscard-value-names is explictly enabled in the commandline for IR input files. Differential Revision: https://reviews.llvm.org/D74878 (cherry picked from commit 11857d49948b845dcfd7c7f78595095e3add012d)
* [LoopRotate] Get and update MSSA only if available in legacy pass manager.Alina Sbirlea2020-02-265-23/+25
| | | | | | | | | | | | | | | | | | | | | Summary: Potential fix for: https://bugs.llvm.org/show_bug.cgi?id=44889 and https://bugs.llvm.org/show_bug.cgi?id=44408 In the legacy pass manager, loop rotate need not compute MemorySSA when not being in the same loop pass manager with other loop passes. There isn't currently a way to differentiate between the two cases, so this attempts to limit the usage in LoopRotate to only update MemorySSA when the analysis is already available. The side-effect of this is that it will split the Loop pipeline. This issue does not apply to the new pass manager, where we have a flag specifying if all loop passes in that loop pass manager preserve MemorySSA. Reviewers: dmgreen, fedor.sergeev, nikic Subscribers: Prazek, hiraditya, george.burgess.iv, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74574 (cherry picked from commit 1326a5a4cfe004181f2ec8231d84ecda2b93cb25)
* Strip preceeding -Xclang when stripping -fcolor-diagnostics or ↵Kadir Cetinkaya2020-02-261-0/+6
| | | | | | | | | | | | | | | | | | -fdiagnostics-color Summary: Fixes https://github.com/clangd/clangd/issues/279. We were removing the color options but not the preceeding -Xclang which causes errors since the -Xclang would now apply to the next option in the list of options. Now, when removing a color option, we check if there was a preceeding -Xclang and remove it as well. Patch By @DaanDeMeyer ! Reviewers: sammccall, kadircet Reviewed By: sammccall Subscribers: ilya-biryukov, usaxena95 Differential Revision: https://reviews.llvm.org/D75019 (cherry picked from commit da236f235028c82c2f0e00eea1f6f9c689bcae4a)
* [Polly][docs] Polly release notes.Michael Kruse2020-02-251-1/+41
| | | | | In release 10.0, Polly is not linked into opt/bugpoint/clang by default anymore. Add workarounds in release notes.
* [docs][WebAssembly] WebAssembly-specific release notes for 10.0.Dan Gohman2020-02-253-1/+10
|
* [docs] clangd release notesSam McCall2020-02-251-1/+44
|
* Fix DfaEmitter::visitDfaState() crash in MSVC x86 debug builds (PR44945)Hans Wennborg2020-02-252-5/+8
| | | | | | | No functionality change (intended), but this seems to make the code a bit clearer for the compiler and maybe for human readers too. (cherry picked from commit edae4be8e21c5deb9a8ffc24a8c17e70b878bf39)
* build_llvm_package.bat: Produce zip files in addition to the installersHans Wennborg2020-02-251-1/+12
| | | | | | | | | | Now that the Windows installer no longer does anything besides self-extract, maybe it would make sense to distribute the toolchain as a plain zip file in addition to the current installer. Differential revision: https://reviews.llvm.org/D74896 (cherry picked from commit 4486aa03c5f431ba33a1d1ac9991da912e3decd9)
* Add Control Flow Guard in Clang release notes.Hans Wennborg2020-02-251-0/+6
| | | | | | By Andrew Paverd! Differential revision: https://reviews.llvm.org/D75047
* Don't generate libcalls for wide shift on Windows ARM (PR42711)Hans Wennborg2020-02-252-2/+8
| | | | | | | The previous patch (cff90f07cb5cc3c3bc58277926103af31caef308) didn't cover ARM. (cherry picked from commit decd021facba804b57e8d80b6159c987d3261ab8)
* Add llvm-cov to LLVM_TOOLCHAIN_TOOLSHans Wennborg2020-02-251-0/+1
| | | | | | See https://github.com/llvm/llvm-project/issues/141 (cherry picked from commit dcd89b3de6de891bfcc59189cda1ea059fbdcdb5)
* Add -debug-info-kind=constructor to clang release notesAmy Huang2020-02-241-0/+4
|
* ReleaseNotes: Mention improved DWARF5 support in lldbPavel Labath2020-02-241-0/+2
| | | | | Mainly involves location and range list handling, but other holes have been filled too.
* ReleaseNotes: ARM and AArch64Hans Wennborg2020-02-242-2/+11
| | | | By Kristof Beyls!
* ReleaseNotes: AttributorHans Wennborg2020-02-241-1/+9
| | | | By Johannes Doerfert!
* ReleaseNotes: OpenMPHans Wennborg2020-02-241-1/+19
| | | | By Alexey Bataev!
* [docs] Add -Wmisleading-indentation to clang's release notes.Tyker2020-02-221-0/+4
|
* [docs] Add some LLDB release notesRaphael Isemann2020-02-211-0/+9
|
* Filter callbr insts from critical edge splittingBill Wendling2020-02-213-2/+22
| | | | | | | | Similarly to how splitting predecessors with an indirectbr isn't handled in the generic way, we also shouldn't split callbrs, for similar reasons. (cherry picked from commit 2fe457690da0fc38bc7f9f1d0aee2ba6a6a16ada)
* Revert "[CMake] CheckAtomic.cmake: catch false positives in RISC-V"Hans Wennborg2020-02-201-5/+1
| | | | | | | This reverts commit a572a8a147c76b9d31585c2d4257a5db566c9a9d. Apparently it was part of a larger series, and I'm not planning on merging that; see https://reviews.llvm.org/D68964
* [libc++] Fix ABI break in __bit_reference.Eric Fiselier2020-02-202-0/+72
| | | | | | | | | | | | | | | | | | | The libc++ __bit_iterator type has weird ABI calling conventions as a quirk of the implementation. The const bit iterator is trivial, but the non-const bit iterator is not because it declares a user-defined copy constructor. Changing this now is an ABI break, so this test ensures that each type is trivial/non-trivial as expected. The definition of 'non-trivial for the purposes of calls': A type is considered non-trivial for the purposes of calls if: * it has a non-trivial copy constructor, move constructor, or destructor, or * all of its copy and move constructors are deleted. (cherry picked from commit a829443cc7359ecf0f2de8f82519f511795675ec)
* [CMake] CheckAtomic.cmake: catch false positives in RISC-VGokturk Yuksek2020-02-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The check for 'HAVE_CXX_ATOMICS_WITHOUT_LIB' may create false positives in RISC-V. This is reproducible when compiling LLVM natively using GCC on a rv64gc (rv64imafdgc) host. Due to the 'A' (atomic) extension, g++ replaces calls to libatomic operations on the std::atomic<int> type with the native hardware instructions. As a result, the compilation succeeds and the build system thinks it doesn't need to pass '-latomic'. Improve the reliability of the 'HAVE_CXX_ATOMICS_WITHOUT_LIB' test in two steps: 1. Force a pre-increment on x (++x), which should force a call to a libatomic function; 2. Because step 1 would resolve the increment to 'amoadd.w.aq' under the 'A' extension, force the same operation on sub-word types, for which there is no hardware support. Reviewers: jfb, hintonda, smeenai, mgorny, JDevlieghere, jyknight Reviewed By: jfb Tags: #llvm Differential Revision: https://reviews.llvm.org/D68964 (cherry picked from commit cef85193b2cc1817ca43199a0ae9c6f25723997d)
* [RISCV] Correct the CallPreservedMask for the function call in an interrupt ↵Shiva Chen2020-02-202-7/+70
| | | | | | | | | | | handler CallPreservedMask is used to describe the register liveness after a function call. The function call in an interrupt handler should use the same CallPreservedMask as normal functions. So that only callee save registers can live through the function call. (cherry picked from commit 1cae2f9d192c69833e22684ca338660942ab464e)
* [windows] Add /Gw to compiler flagsNico Weber2020-02-202-0/+5
| | | | | | | | | | | | This is like -fdata-sections, and it's not part of /O2 by default for some reason. In the cmake build, reduces the size of clang.exe from 70,358,016 bytes to 69,982,720 bytes. clang-format.exe goes from 3,703,296 bytes to 3,331,072 bytes. Differential Revision: https://reviews.llvm.org/D74573 (cherry picked from commit 09153ab9d267a86d6e9bce18d5074617de5879a5)
* Add -std=c++20 flag, replace C++2a with C++20 throughout the ClangRichard Smith2020-02-1934-292/+312
| | | | | | | | | | | | | user interface and documentation, and update __cplusplus for C++20. WG21 considers the C++20 standard to be finished (even though it still has some more steps to pass through in the ISO process). The old flag names are accepted for compatibility, as usual, and we still have lots of references to C++2a in comments and identifiers; those can be cleaned up separately. (cherry picked from commit 24ad121582454e625bdad125c90d9ac0dae948c8)
* Fix unused function warning (PR44808)Hans Wennborg2020-02-191-5/+7
| | | | (cherry picked from commit a19de32095e4cdb18957e66609574ce2021a8d1c)
* Fix a buffer-size bug when the first DW_OP_piece is undefinedAdrian Prantl2020-02-192-1/+10
| | | | | | | | | | | | | | and document the shortcomings of LLDB's partially defined DW_OP_piece handling. This would manifest as "DW_OP_piece for offset foo but top of stack is of size bar". rdar://problem/46262998 Differential Revision: https://reviews.llvm.org/D72880 (cherry picked from commit f55ab6f90b7317a6bb85303a6102702bdae1199e)
* Add testing for DW_OP_piece and fix a bug with small Scalar values.Adrian Prantl2020-02-192-5/+34
| | | | | | | | | | | | By switching to Scalars that are backed by explicitly-sized APInts we can avoid a bug that increases the buffer reserved for a small piece to the next-largest host integer type. This manifests as "DW_OP_piece for offset foo but top of stack is of size bar". Differential Revision: https://reviews.llvm.org/D72879 (cherry picked from commit 7b0d58e339b271e3b1d9dc14b781b57fa0262e3a)
* [clangd] Make output order of allTargetDecls deterministicKadir Cetinkaya2020-02-191-32/+49
| | | | | | | | | | | | | | | | | Summary: Makes use of insertion order to stabilize output for multiple decls. Fixes https://bugs.llvm.org/show_bug.cgi?id=44564 Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, usaxena95, cfe-commits, aemerson Tags: #clang Differential Revision: https://reviews.llvm.org/D72826 (cherry picked from commit d54d71b67e602674a255e299a22fe31dee1f3619)
* [X86CmovConversion] Make heuristic for optimized cmov depth more ↵Nikita Popov2020-02-191-6/+7
| | | | | | | | | | | | | | | | | | | conservative (PR44539) Fix/workaround for https://bugs.llvm.org/show_bug.cgi?id=44539. As discussed there, this pass makes some overly optimistic assumptions, as it does not have access to actual branch weights. This patch makes the computation of the depth of the optimized cmov more conservative, by assuming a distribution of 75/25 rather than 50/50 and placing the weights to get the more conservative result (larger depth). The fully conservative choice would be std::max(TrueOpDepth, FalseOpDepth), but that would break at least one existing test (which may or may not be an issue in practice). Differential Revision: https://reviews.llvm.org/D74155 (cherry picked from commit 5eb19bf4a2b0c29a8d4d48dfb0276f096eff9bec)
* [SLPVectorizer] Do not assume extracelement idx is a ConstantInt.Florian Hahn2020-02-192-6/+155
| | | | | | | | | | | | | | | | | | The index of an ExtractElementInst is not guaranteed to be a ConstantInt. It can be any integer value. Check explicitly for ConstantInts. The new test cases illustrate scenarios where we crash without this patch. I've also added another test case to check the matching of extractelement vector ops works. Reviewers: RKSimon, ABataev, dtemirbulatov, vporpo Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D74758 (cherry picked from commit e32522ca178acc42e26f21d64ef8fc180ad772bd)
* [CodeGen][Tests] Fix b3cf70427eb1e97d9b89ba6e9298c280c8a32c74Clement Courbet2020-02-191-0/+2
| | | | Add missing lit.local.cfg in test/Transforms/CodeGenPrepare/PowerPC
* Restore functionality of --sysroot on FreeBSD after b18cb9c47Dimitry Andric2020-02-192-6/+15
| | | | | | | | | | | | | | | | | After b18cb9c47, clang would sometimes prefer the host C++ includes (e.g. in /usr/include/c++/v1) before those specified via --sysroot. While this behavior may be desirable on Linux, it is not so on FreeBSD, where we make extensive use of --sysroot during the build of the base system. In that case, clang must *not* search outside the sysroot, except for its own internal headers. Add an override addLibCxxIncludePaths() to restore the old behavior, which is to simply append /usr/include/c++/v1 to the specified sysroot. While here, apply clang-format to the FreeBSD specific toolchain files. Fixes PR44923. (cherry picked from commit 62654cab7e654384ba503d6b62b1054cde19a553)
* Fix a -Wbitwise-conditional-parentheses warning in _LIBUNWIND_ARM_EHABI ↵Nico Weber2020-02-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libunwind builds ``` src/UnwindCursor.hpp:1344:51: error: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Werror,-Wbitwise-conditional-parentheses] _info.flags = isSingleWordEHT ? 1 : 0 | scope32 ? 0x2 : 0; // Use enum? ~~~~~~~~~~~ ^ src/UnwindCursor.hpp:1344:51: note: place parentheses around the '|' expression to silence this warning _info.flags = isSingleWordEHT ? 1 : 0 | scope32 ? 0x2 : 0; // Use enum? ^ ( ) src/UnwindCursor.hpp:1344:51: note: place parentheses around the '?:' expression to evaluate it first _info.flags = isSingleWordEHT ? 1 : 0 | scope32 ? 0x2 : 0; // Use enum? ^ ( ) ``` But `0 |` is a no-op for either of those two interpretations, so I think what was meant here was ``` _info.flags = (isSingleWordEHT ? 1 : 0) | (scope32 ? 0x2 : 0); // Use enum? ``` Previously, if `isSingleWordEHT` was set, bit 2 would never be set. Now it is. From what I can tell, the only thing that checks these bitmask is ProcessDescriptors in Unwind-EHABI.cpp, and that only cares about bit 1, so in practice this shouldn't have much of an effect. Differential Revision: https://reviews.llvm.org/D73890 (cherry picked from commit 221c5af4e4f4a504a4d1f352dd7b76d305e56a62)
* llvm: Use quotes around MSVC_DIA_SDK_DIR CMake variableCristian Adam2020-02-191-1/+1
| | | | | | | MSVC_DIA_SDK_DIR variable will point to a path which contains spaces, and without quotes it will fail to configure the project. (cherry picked from commit d6fe253653b7e760f94ca21d0a7ebbfeeee28777)
OpenPOWER on IntegriCloud