- Jan 16, 2021
-
-
Hsiangkai Wang authored
According to "9. Vector Memory Alignment Constraints" in V specification, the alignment of vector memory access is aligned to the size of the element. In our current implementation, we support ELEN up to 64. We could assume the alignment of vector registers is 64 under the assumption. Differential Revision: https://reviews.llvm.org/D94751
-
Dávid Bolvanský authored
-
Dávid Bolvanský authored
-
James Player authored
Current code breaks this version of MSVC due to a mismatch between `std::is_trivially_copyable` and `llvm::is_trivially_copyable` for `std::pair` instantiations. Hence I was attempting to use `std::is_trivially_copyable` to set `llvm::is_trivially_copyable<T>::value`. I spent some time root causing an `llvm::Optional` build error on MSVC 16.8.3 related to the change described above: ``` 62>C:\src\ocg_llvm\llvm-project\llvm\include\llvm/ADT/BreadthFirstIterator.h(96,12): error C2280: 'llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>> &llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>>::operator =(const llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>> &)': attempting to reference a deleted function (compiling source file C:\src\ocg_llvm\llvm-project\llvm\unittests\ADT\BreadthFirstIteratorTest.cpp) ... ``` The "trivial" specialization of `optional_detail::OptionalStorage` assumes that the value type is trivially copy constructible and trivially copy assignable. The specialization is invoked based on a check of `is_trivially_copyable` alone, which does not imply both `is_trivially_copy_assignable` and `is_trivially_copy_constructible` are true. [[ https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable | According to the spec ]], a deleted assignment operator does not make `is_trivially_copyable` false. So I think all these properties need to be checked explicitly in order to specialize `OptionalStorage` to the "trivial" version: ``` /// Storage for any type. template <typename T, bool = std::is_trivially_copy_constructible<T>::value && std::is_trivially_copy_assignable<T>::value> class OptionalStorage { ``` Above fixed my build break in MSVC, but I think we need to explicitly check `is_trivially_copy_constructible` too since it might be possible the copy constructor is deleted. Also would be ideal to move over to `std::is_trivially_copyable` instead of the `llvm` namespace verson. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D93510
-
Stephen Kelly authored
Differential Revision: https://reviews.llvm.org/D94130
-
Stephen Kelly authored
This is a simple utility which allows matching on binaryOperator and cxxOperatorCallExpr. It can also be extended to support cxxRewrittenBinaryOperator. Add generic support for MapAnyOfMatchers to auto-marshalling functions. Differential Revision: https://reviews.llvm.org/D94129
-
Bjorn Pettersson authored
This is a follow-up fix to commit 03c8d6a0. Seems like we now end up with NeedInvert being set in the result from LegalizeSetCCCondCode more often than in the past, so we need to handle NeedInvert when expanding BR_CC. Not sure how to deal with the "Tmp4.getNode()" case properly, but current assumption is that that code path isn't impacted by the changes in 03c8d6a0 so we can simply move the old assert into the if-branch and only handle NeedInvert in the else-branch. I think that the test case added here, for PowerPC, might have failed also before commit 03c8d6a0. But we started to hit the assert more often downstream when having merged that commit. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94762
-
Stephen Kelly authored
This makes them composable with mapAnyOf(). Differential Revision: https://reviews.llvm.org/D94128
-
Stephen Kelly authored
Make it possible to compose a matcher for different base nodes. This accepts one or more node matcher functors and zero or more matchers, composing the latter into the former. This allows composing of matchers where the same inner matcher name is used for the same concept, but with a different node functor. Currently, there is a limitation that the nodes must be in the same "clade", so while mapAnyOf(ifStmt, forStmt).with(hasBody(stmt())) can be used, functionDecl can not be added to the tuple. It is possible to use this in clang-query, but it will require changes to the QueryParser, so is deferred to a future review. Differential Revision: https://reviews.llvm.org/D94127
-
Nikita Popov authored
-
Juneyoung Lee authored
-
Juneyoung Lee authored
-
Jeroen Dobbelaere authored
The ``llvm.experimental.noalias.scope.decl`` intrinsic identifies where a noalias scope is declared. When the intrinsic is duplicated, a decision must also be made about the scope: depending on the reason of the duplication, the scope might need to be duplicated as well. Reviewed By: nikic, jdoerfert Differential Revision: https://reviews.llvm.org/D93039
-
Amara Emerson authored
Forgot to check if the predicate is safe to commutate operands.
-
Mircea Trofin authored
inline The stats are printed at InlinePass destruction. When we have 2 of them, it appears the destruction order of the Passes std::vector of the pass manager differs in msan builds - example: http://lab.llvm.org:8011/#/builders/74/builds/2135. This reproes locally, too. Temporarily removing the sub-test case, to green the build, and will follow up with a stat dumping alternative that does not depend on vector element dtor order.
-
Douglas Yung authored
This test will fail with any toolchains that don't default to C11. Adding this switch to the clang invocation in the test fixes the issue. Patch by Justice Adams! Reviewed By: dyung Differential Revision: https://reviews.llvm.org/D94829
-
Kazu Hirata authored
This patch renames SubsequentDelim to ListSeparator to clarify the purpose of the class. Differential Revision: https://reviews.llvm.org/D94649
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Mircea Trofin authored
-
Mircea Trofin authored
Expanding from D94808 - we ensure the same InlineAdvisor is used by both InlinerPass instances. The notion of mandatory inlining is moved into the core InlineAdvisor: advisors anyway have to handle that case, so this change also factors out that a bit better. Differential Revision: https://reviews.llvm.org/D94825
-
Jonas Devlieghere authored
-
Thomas Raoux authored
-
River Riddle authored
This fixes errors when location strings contains newlines, or other non-ascii characters. Differential Revision: https://reviews.llvm.org/D94847
-
Thomas Raoux authored
This allow using this helper outside of the linalg canonicalization. Differential Revision: https://reviews.llvm.org/D94826
-
peter klausler authored
When a reference to a generic interface occurs in a specification expression that must be emitted to a module file, we have a problem when the generic resolves to a function whose name is inaccessible due to being PRIVATE or due to a conflict with another use of the same name in the scope. In these cases, construct a new name for the specific procedure and emit a renaming USE to the module file. Also, relax enforcement of PRIVATE when analyzing module files. Differential Revision: https://reviews.llvm.org/D94815
-
Mircea Trofin authored
Differential Revision: https://reviews.llvm.org/D94836
-
Peter Collingbourne authored
D90422 changed this test to write a fixed value into register x23 instead of x20, but it did not update the list of reserved registers. This meant that x23 may have been live across the register write, although this happens to not be the case with the current compiler. Fix the problem by updating the reserved register list.
-
Derek Schuff authored
This reverts commit 38dfce70. CI discovered a bug where the table is exported twice: see D91870
-
Derek Schuff authored
This reverts commit e9f1ed23. Reverting because it depends on 38dfce70
-
Dávid Bolvanský authored
Example: ``` __attribute__((nonnull,noinline)) char * pinc(char *p) { return ++p; } char * foo(bool b, char *a) { return pinc(b ? 0 : a); } ``` optimize to ``` char * foo(bool b, char *a) { return pinc(a); } ``` Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D94180 -
Vladislav Vinogradov authored
Unary minus operator applied to unsigned type, result still unsigned. Use `~0U` instead of `-1U` and `1 + ~VAL` instead of `-VAL`. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D94417
-
Amara Emerson authored
-
Duncan P. N. Exon Smith authored
This reverts commit 33be50da, effectively reapplying: - 260a856c - 3043e5a5 - 49142991 ... with a fix to skip a call to `SmallVector::isReferenceToStorage()` when we know the parameter had been taken by value for small, POD-like `T`. See https://reviews.llvm.org/D93779 for the discussion on the revert. At a high-level, these commits fix reference invalidation in SmallVector's push_back, append, insert (one or N), and resize operations. For more details, please see the original commit messages. This commit fixes a bug that crept into `SmallVectorTemplateCommon::reserveForAndGetAddress()` during the review process after performance analysis was done. That function is now called `reserveForParamAndGetAddress()`, clarifying that it only works for parameter values. It uses that knowledge to bypass `SmallVector::isReferenceToStorage()` when `TakesParamByValue`. This is `constexpr` and avoids adding overhead for "small enough", trivially copyable `T`. Performance could potentially be tuned further by increasing the threshold for `TakesParamByValue`, which is currently defined as: ``` bool TakesParamByValue = sizeof(T) <= 2 * sizeof(void *); ``` in the POD-like version of SmallVectorTemplateBase (else, `false`). Differential Revision: https://reviews.llvm.org/D94800
-
Sanjay Patel authored
To get into this block we had: !A || B || C and we checked C in the first 'if' clause leaving !A || B. But the 2nd 'if' is checking: A && !B --> !(!A || B)
-
Jason Molenda authored
Differential Revision: https://reviews.llvm.org/D94754
-
MaheshRavishankar authored
The operantion is an identity if the values yielded by the operation is the argument of the basic block of that operation. Add this missing check. Differential Revision: https://reviews.llvm.org/D94819
-
Nick Desaulniers authored
Otherwise we'll fail the assertion in SplitBlockPredecessors() related to splitting the edges from CallBr's. Fixes: https://github.com/ClangBuiltLinux/linux/issues/1161 Fixes: https://github.com/ClangBuiltLinux/linux/issues/1252 Reviewed By: void, MaskRay, jyknight Differential Revision: https://reviews.llvm.org/D88438
-
Christopher Di Bella authored
We'd discussed adding the warning to -Wall in D89988. This patch honours that.
-
Reid Kleckner authored
If the host compiler is MSVC or clang-cl, then the compiler used to buidl the runtimes will be clang-cl, and it doesn't support either of those flags. Worse, because -isystem is a space separated flag, it causes all cmake try_compile tests to fail, so none of the -Wno-* flags make it to the compiler in libcxx. I noticed that we weren't passing -Wno-user-defined-literals to clang-cl and were getting warnings in the build, and this fixes that for me. Differential Revision: https://reviews.llvm.org/D94817
-