- 19 Mar, 2020 5 commits
-
-
Saar Raz authored
[Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates an invalid template-id TryAnnotateTypeConstraint could annotate a template-id which doesn't end up being a type-constraint, in which case control flow would incorrectly flow into ParseImplicitInt. Reenter the loop in this case. Enable relevant tests for C++20. This required disabling typo-correction during TryAnnotateTypeConstraint and changing a test case which is broken due to a separate bug (will be reported and handled separately). (cherry picked from commit 19fccc52)
-
Hans Wennborg authored
../llvm/utils/update_test_checks.py --opt-binary bin/opt ../llvm/test/Transforms/PhaseOrdering/min-max-abs-cse.ll
-
Sanjay Patel authored
As discussed in PR41083: https://bugs.llvm.org/show_bug.cgi?id=41083 ...we can assert/crash in EarlyCSE using the current hashing scheme and instructions with flags. ValueTracking's matchSelectPattern() may rely on overflow (nsw, etc) or other flags when detecting patterns such as min/max/abs composed of compare+select. But the value numbering / hashing mechanism used by EarlyCSE intersects those flags to allow more CSE. Several alternatives to solve this are discussed in the bug report. This patch avoids the issue by doing simple matching of min/max/abs patterns that never requires instruction flags. We give up some CSE power because of that, but that is not expected to result in much actual performance difference because InstCombine will canonicalize these patterns when possible. It even has this comment for abs/nabs: /// Canonicalize all these variants to 1 pattern. /// This makes CSE more likely. (And this patch adds PhaseOrdering tests to verify that the expected transforms are still happening in the standard optimization pipelines. I left this code to use ValueTracking's "flavor" enum values, so we don't have to change the callers' code. If we decide to go back to using the ValueTracking call (by changing the hashing algorithm instead), it should be obvious how to replace this chunk. Differential Revision: https://reviews.llvm.org/D74285 (cherry picked from commit b8ebc11f)
-
Sanjay Patel authored
Test that instcombine and early-cse can cooperate to reduce sequences of select patterns that are not composed of the same underlying instructions. There's a bug in EarlyCSE (PR41083), and we can test how much a possible fix (D74285) may affect optimization. (cherry picked from commit 0ad6e726)
-
- 18 Mar, 2020 2 commits
-
-
Hans Wennborg authored
We're not planning more release candidates for 10.0.0 at the moment, so reverting for now. This reverts commit 9e0bd5ec.
-
Hans Wennborg authored
Revert "[Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates an invalid template-id" We're not planning more release candidates for 10.0.0 at the moment, so reverting for now. This reverts commit 135744ce.
-
- 17 Mar, 2020 2 commits
-
-
Saar Raz authored
[Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates an invalid template-id TryAnnotateTypeConstraint could annotate a template-id which doesn't end up being a type-constraint, in which case control flow would incorrectly flow into ParseImplicitInt. Reenter the loop in this case. Enable relevant tests for C++20. This required disabling typo-correction during TryAnnotateTypeConstraint and changing a test case which is broken due to a separate bug (will be reported and handled separately). (cherry picked from commit 19fccc52)
-
- 16 Mar, 2020 1 commit
-
-
Sam McCall authored
-
- 13 Mar, 2020 3 commits
-
-
Hans Wennborg authored
-
Nico Weber authored
-
Alexandre Ganea authored
After a crash catched by the CrashRecoveryContext, this patch prevents from accessing dangling pointers in TimerGroup structures before the clang tool exits. Previously, the default TimerGroup had internal linked lists which were still pointing to old Timer or TimerGroup instances, which lived in stack frames released by the CrashRecoveryContext. Fixes PR45164. Differential Revision: https://reviews.llvm.org/D76099 (cherry picked from commit 28ad9fc2)
-
- 12 Mar, 2020 2 commits
-
-
Richard Smith authored
a dependent context. This matches the GCC behavior. We track the enclosing template depth when determining whether a statement expression is within a dependent context; there doesn't appear to be any other reliable way to determine this. We previously assumed they were neither value- nor instantiation-dependent under any circumstances, which would lead to crashes and other misbehavior. (cherry picked from commit 5c845c1c)
-
Hans Wennborg authored
This turned out to cause problems, and was reverted on master together with its follow-up change in 66addf8e. This reverts commit 3a843031.
-
- 11 Mar, 2020 1 commit
-
-
Richard Smith authored
deduction guides. Previously if an implicit deduction guide had a default argument with a cleanup, we'd leave the 'pending cleanup' flag set after declaring the implicit guide. But it turns out that there's no reason to even substitute into the default argument when declaring an implicit deduction guide: we only need to record that the default argument exists, not what it is, since we never actually form a call to a deduction guide. (cherry picked from commit 6d894afd)
-
- 10 Mar, 2020 2 commits
-
- 06 Mar, 2020 2 commits
-
-
Saar Raz authored
[Concepts] Add null check for TemplateTypeParmType::getDecl() in GetContainedInventedTypeParmVisitor GetContainedInventedTypeParmVisitor would not account for the case where TemplateTypeParmType::getDecl() is nullptr, causing bug #45102. Add the nullptr check. (cherry picked from commit 865456d5)
-
Rainer Orth authored
mlir currently fails to build on Solaris: /vol/llvm/src/llvm-project/dist/mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp:78:20: error: reference to 'index_t' is ambiguous IndexHandle zero(index_t(0)), one(index_t(1)); ^ /usr/include/sys/types.h:103:16: note: candidate found by name lookup is 'index_t' typedef short index_t; ^ /vol/llvm/src/llvm-project/dist/mlir/include/mlir/EDSC/Builders.h:27:8: note: candidate found by name lookup is 'mlir::edsc::index_t' struct index_t { ^ and many more. Given that POSIX reserves all identifiers ending in `_t` 2.2.2 The Name Space <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html>, it seems quite unwise to use such identifiers in user code, even more so without a distinguished prefix. The following patch fixes this by renaming `index_t` to `index_type`. cases. Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D72619 (cherry picked from commit 002ec79f)
-
- 05 Mar, 2020 1 commit
-
-
Sylvestre Ledru authored
See https://reviews.llvm.org/D69573
-
- 04 Mar, 2020 4 commits
-
-
Hans Wennborg authored
-
Richard Smith authored
dependent contexts. We previously assumed they were neither value- nor instantiation-dependent under any circumstances, which would lead to crashes and other misbehavior. (cherry picked from commit bdad0a1b)
-
Nathan James authored
Summary: The define out of line refactor tool previously would copy the `virtual`, `override` and `final` specifier into the out of line method definition. This results in malformed code as those specifiers aren't allowed outside the class definition. Reviewers: hokein, kadircet Reviewed By: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D75429 (cherry picked from commit b2666ccc)
-
Peter Wu authored
-
- 03 Mar, 2020 2 commits
-
-
Hans Wennborg authored
This reverts commit 94d4ca90. I reverted 68a235d0 again in 916be8fd. (cherry picked from commit 93c73d48)
-
Hans Wennborg authored
and follow-ups: a2ca1c2d "build: disable zlib by default on Windows" 2181bf40 "[CMake] Link against ZLIB::ZLIB" 1079c68a "Attempt to fix ZLIB CMake logic on Windows" This changed the output of llvm-config --system-libs, and more importantly it broke stand-alone builds. Instead of piling on more fix attempts, let's revert this to reduce the risk of more breakages. (cherry picked from commit 916be8fd)
-
- 02 Mar, 2020 9 commits
-
-
Nick Desaulniers authored
Summary: As per rsmith (https://reviews.llvm.org/D75383). Reviewers: hans Reviewed By: hans Subscribers: cfe-commits, rsmith Tags: #clang Differential Revision: https://reviews.llvm.org/D75469
-
Hans Wennborg authored
-
Reid Kleckner authored
getFirstInsertionPt's return value must be checked for validity before casting it to Instruction*. Don't attempt to insert casts after a phi in a catchswitch block. Fixes PR45033, introduced in D37832. Reviewed By: davidxl, hfinkel Differential Revision: https://reviews.llvm.org/D75381 (cherry picked from commit 1adbe86d)
-
Krasimir Georgiev authored
Summary: Revision a75f8d98 fixed spacing for operators, but caused the const and non-const versions to diverge: ``` // With Style.PointerAlignment = FormatStyle::PAS_Left: struct A { operator char*() { return ""; } operator const char *() const { return ""; } }; ``` The code was checking if the type specifier was directly preceded by `operator`. However there could be comments and `const/volatile` in between. Reviewers: mprobst Reviewed By: mprobst Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72911 (cherry picked from commit 33463cfb)
-
Reid Kleckner authored
CMake doesn't seem to like it when you regex search for "^". (cherry picked from commit 1079c68a)
-
Petr Hosek authored
This is the imported target that find_package(ZLIB) defines. Differential Revision: https://reviews.llvm.org/D74176 (cherry picked from commit 2181bf40)
-
Petr Hosek authored
Using INTERFACE prevents the use of imported libraries as we've done in 00b3d49d because these aren't linked against the target, they're only made part of the interface. This doesn't affect the output since static libraries aren't being linked into, but it enables the use of imported libraries. Differential Revision: https://reviews.llvm.org/D74106 (cherry picked from commit 50a6d3a6)
-
Reid Kleckner authored
CMake is complaining about the "^" regex if the prefixes are empty strings. (cherry picked from commit e441a584)
-
Michael Spencer authored
rG01f9abbb moved WindowsSupport.h to include/llvm/Support/Windows/ This is a problem because the modulemap include all of the Support and ADT directories, thus any use of any header in Support or ADT would cause the compiler to try to build WindowsSupport.h, which only works on Windows. Fix this by explicitly excluding WindowsSupport.h from the LLVM_Util module. (cherry picked from commit 0b6abe42)
-
- 01 Mar, 2020 1 commit
-
-
Michael Kruse authored
Highlight work that has been done during the development window. After cherry-picking D72372 to fix PR45001 no workaround is necessary anymore, but the generalization of the linking mechanism is still worth pointing out.
-
- 28 Feb, 2020 3 commits
-
-
Hans Wennborg authored
-
Hans Wennborg authored
bin/clang-tblgen -gen-diag-docs -I../clang/include \ -I../clang/include/clang/Basic/ \ ../clang/include/clang/Basic/Diagnostic.td -o \ ../clang/docs/DiagnosticsReference.rst && \ bin/clang-tblgen -gen-attr-docs -I../clang/include \ ../clang/include/clang/Basic/Attr.td -o \ ../clang/docs/AttributeReference.rst && \ bin/clang-tblgen -gen-opt-docs -I../clang/include \ -I../clang/include/clang/Driver -I../llvm/include \ ../clang/include/clang/Driver/ClangOptionDocs.td -o \ ../clang/docs/ClangCommandLineReference.rst -
Hans Wennborg authored
-