From d74a6bc3d6a0073f455c1d46eb9206e59628fb9d Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 7 Oct 2024 08:31:25 -0700 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@82f5acfbec65 Updates LLVM usage to match [82f5acfbec65](https://github.com/llvm/llvm-project/commit/82f5acfbec65) PiperOrigin-RevId: 683194401 --- third_party/llvm/generated.patch | 501 ++++++++++++++++++++----------- third_party/llvm/workspace.bzl | 4 +- 2 files changed, 329 insertions(+), 176 deletions(-) diff --git a/third_party/llvm/generated.patch b/third_party/llvm/generated.patch index 6525f9202..f8fa2d147 100644 --- a/third_party/llvm/generated.patch +++ b/third_party/llvm/generated.patch @@ -1,149 +1,332 @@ Auto generated patch. Do not edit or delete it, even if empty. -diff -ruN --strip-trailing-cr a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp ---- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp -+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp -@@ -9181,12 +9181,13 @@ - for (unsigned Cnt : Slices) { - ArrayRef Slice = VL.slice(Cnt, VF); - // If any instruction is vectorized already - do not try again. -- if (const TreeEntry *SE = getTreeEntry(Slice.front()); -+ if (TreeEntry *SE = getTreeEntry(Slice.front()); - SE || getTreeEntry(Slice.back())) { - if (!SE) - continue; - if (VF != SE->getVectorFactor() || !SE->isSame(Slice)) - continue; -+ SE->UserTreeIndices.emplace_back(&E, UINT_MAX); - AddCombinedNode(SE->Idx, Cnt); - continue; - } -@@ -13439,7 +13440,12 @@ - if (CommonMask[Idx] != PoisonMaskElem) - CommonMask[Idx] = Idx; - for (auto [E, Idx] : SubVectors) { -- Value *V = castToScalarTyElem(E->VectorizedValue); -+ Value *V = E->VectorizedValue; -+ if (V->getType()->isIntOrIntVectorTy()) -+ V = castToScalarTyElem(V, any_of(E->Scalars, [&](Value *V) { -+ return !isKnownNonNegative( -+ V, SimplifyQuery(*R.DL)); -+ })); - Vec = Builder.CreateInsertVector(Vec->getType(), Vec, V, - Builder.getInt64(Idx)); - if (!CommonMask.empty()) { -diff -ruN --strip-trailing-cr a/llvm/test/Transforms/SLPVectorizer/X86/subvector-minbitwidth-unsigned-value.ll b/llvm/test/Transforms/SLPVectorizer/X86/subvector-minbitwidth-unsigned-value.ll ---- a/llvm/test/Transforms/SLPVectorizer/X86/subvector-minbitwidth-unsigned-value.ll -+++ b/llvm/test/Transforms/SLPVectorizer/X86/subvector-minbitwidth-unsigned-value.ll -@@ -0,0 +1,97 @@ -+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 -+; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s +diff -ruN --strip-trailing-cr a/libcxx/include/__memory/array_cookie.h b/libcxx/include/__memory/array_cookie.h +--- a/libcxx/include/__memory/array_cookie.h ++++ b/libcxx/include/__memory/array_cookie.h +@@ -24,7 +24,7 @@ + _LIBCPP_BEGIN_NAMESPACE_STD + + // Trait representing whether a type requires an array cookie at the start of its allocation when +-// allocated as `new T[n]` and deallocated as `delete array`. ++// allocated as `new T[n]` and deallocated as `delete[] array`. + // + // Under the Itanium C++ ABI [1], we know that an array cookie is available unless `T` is trivially + // destructible and the call to `operator delete[]` is not a sized operator delete. Under ABIs other +diff -ruN --strip-trailing-cr a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h +--- a/libcxx/include/__memory/unique_ptr.h ++++ b/libcxx/include/__memory/unique_ptr.h +@@ -102,6 +102,12 @@ + }; + + template ++struct __is_default_deleter : false_type {}; ++ ++template ++struct __is_default_deleter > : true_type {}; ++ ++template + struct __unique_ptr_deleter_sfinae { + static_assert(!is_reference<_Deleter>::value, "incorrect specialization"); + typedef const _Deleter& __lval_ref_type; +@@ -307,11 +313,16 @@ + // 1. When an array cookie (see [1]) exists at the beginning of the array allocation, we are + // able to reuse that cookie to extract the size of the array and perform bounds checking. + // An array cookie is a size inserted at the beginning of the allocation by the compiler. +-// That size is inserted implicitly when doing `new T[n]` in some cases, and its purpose +-// is to allow the runtime to destroy the `n` array elements when doing `delete array`. ++// That size is inserted implicitly when doing `new T[n]` in some cases (as of writing this ++// exactly when the array elements are not trivially destructible), and its main purpose is ++// to allow the runtime to destroy the `n` array elements when doing `delete[] array`. + // When we are able to use array cookies, we reuse information already available in the + // current runtime, so bounds checking does not require changing libc++'s ABI. + // ++// However, note that we cannot assume the presence of an array cookie when a custom deleter ++// is used, because the unique_ptr could have been created from an allocation that wasn't ++// obtained via `new T[n]` (since it may not be deleted with `delete[] arr`). ++// + // 2. When the "bounded unique_ptr" ABI configuration (controlled by `_LIBCPP_ABI_BOUNDED_UNIQUE_PTR`) + // is enabled, we store the size of the allocation (when it is known) so we can check it when + // indexing into the `unique_ptr`. That changes the layout of `std::unique_ptr`, which is +@@ -328,7 +339,7 @@ + // try to fall back to using an array cookie when available. + // + // Finally, note that when this ABI configuration is enabled, we have no choice but to always +-// make space for a size to be stored in the unique_ptr. Indeed, while we might want to avoid ++// make space for the size to be stored in the unique_ptr. Indeed, while we might want to avoid + // storing the size when an array cookie is available, knowing whether an array cookie is available + // requires the type stored in the unique_ptr to be complete, while unique_ptr can normally + // accommodate incomplete types. +@@ -339,7 +350,9 @@ + __unique_ptr_array_bounds_stateless() = default; + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __unique_ptr_array_bounds_stateless(size_t) {} + +- template ::value, int> = 0> ++ template ::value && __has_array_cookie<_Tp>::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __in_bounds(_Tp* __ptr, size_t __index) const { + // In constant expressions, we can't check the array cookie so we just pretend that the index + // is in-bounds. The compiler catches invalid accesses anyway. +@@ -349,7 +362,9 @@ + return __index < __cookie; + } + +- template ::value, int> = 0> ++ template ::value || !__has_array_cookie<_Tp>::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __in_bounds(_Tp*, size_t) const { + return true; // If we don't have an array cookie, we assume the access is in-bounds + } +@@ -365,7 +380,9 @@ + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __unique_ptr_array_bounds_stored(size_t __size) : __size_(__size) {} + + // Use the array cookie if there's one +- template ::value, int> = 0> ++ template ::value && __has_array_cookie<_Tp>::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __in_bounds(_Tp* __ptr, size_t __index) const { + if (__libcpp_is_constant_evaluated()) + return true; +@@ -374,7 +391,9 @@ + } + + // Otherwise, fall back on the stored size (if any) +- template ::value, int> = 0> ++ template ::value || !__has_array_cookie<_Tp>::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __in_bounds(_Tp*, size_t __index) const { + return __index < __size_; + } +@@ -562,7 +581,7 @@ + } + + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 __add_lvalue_reference_t<_Tp> operator[](size_t __i) const { +- _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__checker_.__in_bounds(std::__to_address(__ptr_), __i), ++ _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__checker_.__in_bounds(std::__to_address(__ptr_), __i), + "unique_ptr::operator[](index): index out of range"); + return __ptr_[__i]; + } +diff -ruN --strip-trailing-cr a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp +--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp ++++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp +@@ -48,31 +48,24 @@ + + template + void test() { +- // For types with an array cookie, we can always detect OOB accesses. ++ // For types with an array cookie, we can always detect OOB accesses. Note that reliance on an array ++ // cookie is limited to the default deleter, since a unique_ptr with a custom deleter may not have ++ // been allocated with `new T[n]`. + { +- // Check with the default deleter + { +- { +- std::unique_ptr ptr(new WithCookie[5]); +- TEST_LIBCPP_ASSERT_FAILURE(ptr[6], "unique_ptr::operator[](index): index out of range"); +- } +- { +- std::unique_ptr ptr = std::make_unique(5); +- TEST_LIBCPP_ASSERT_FAILURE(ptr[6], "unique_ptr::operator[](index): index out of range"); +- } +-#if TEST_STD_VER >= 20 +- { +- std::unique_ptr ptr = std::make_unique_for_overwrite(5); +- TEST_LIBCPP_ASSERT_FAILURE(ptr[6] = WithCookie(), "unique_ptr::operator[](index): index out of range"); +- } +-#endif ++ std::unique_ptr ptr(new WithCookie[5]); ++ TEST_LIBCPP_ASSERT_FAILURE(ptr[6], "unique_ptr::operator[](index): index out of range"); + } +- +- // Check with a custom deleter + { +- std::unique_ptr ptr(new WithCookie[5]); ++ std::unique_ptr ptr = std::make_unique(5); + TEST_LIBCPP_ASSERT_FAILURE(ptr[6], "unique_ptr::operator[](index): index out of range"); + } ++#if TEST_STD_VER >= 20 ++ { ++ std::unique_ptr ptr = std::make_unique_for_overwrite(5); ++ TEST_LIBCPP_ASSERT_FAILURE(ptr[6] = WithCookie(), "unique_ptr::operator[](index): index out of range"); ++ } ++#endif + } + + // For types that don't have an array cookie, things are a bit more complicated. We can detect OOB accesses +@@ -97,14 +90,9 @@ + #endif + + // Make sure that we carry the bounds information properly through conversions, assignments, etc. +- // These tests are mostly relevant when the ABI setting is enabled (with a stateful bounds-checker), +- // but we still run them for types with an array cookie either way. ++ // These tests are only relevant when the ABI setting is enabled (with a stateful bounds-checker). + #if defined(_LIBCPP_ABI_BOUNDED_UNIQUE_PTR) +- using Types = types::type_list; +-#else +- using Types = types::type_list; +-#endif +- types::for_each(Types(), [] { ++ types::for_each(types::type_list(), [] { + // Bounds carried through move construction + { + std::unique_ptr ptr = std::make_unique(5); +@@ -135,6 +123,7 @@ + TEST_LIBCPP_ASSERT_FAILURE(other[6], "unique_ptr::operator[](index): index out of range"); + } + }); ++#endif + } + + template +diff -ruN --strip-trailing-cr a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp +--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp ++++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp +@@ -46,6 +46,11 @@ + template + struct CustomDeleter : std::default_delete {}; + ++struct NoopDeleter { ++ template ++ TEST_CONSTEXPR_CXX23 void operator()(T*) const {} ++}; + -+define i1 @test(i64 %v1, ptr %v2, i32 %v3, i1 %v4) { -+; CHECK-LABEL: define i1 @test( -+; CHECK-SAME: i64 [[V1:%.*]], ptr [[V2:%.*]], i32 [[V3:%.*]], i1 [[V4:%.*]]) { -+; CHECK-NEXT: [[NEWFUNCROOT:.*:]] -+; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x i64> poison, i64 [[V1]], i32 0 -+; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <2 x i64> [[TMP0]], <2 x i64> poison, <2 x i32> zeroinitializer -+; CHECK-NEXT: [[TMP2:%.*]] = lshr <2 x i64> [[TMP1]], -+; CHECK-NEXT: [[TMP3:%.*]] = trunc <2 x i64> [[TMP2]] to <2 x i8> -+; CHECK-NEXT: [[TMP4:%.*]] = and <2 x i8> [[TMP3]], -+; CHECK-NEXT: [[TMP5:%.*]] = zext <2 x i8> [[TMP4]] to <2 x i32> -+; CHECK-NEXT: [[TMP6:%.*]] = icmp eq <2 x i32> [[TMP5]], zeroinitializer -+; CHECK-NEXT: [[TMP7:%.*]] = insertelement <4 x i32> poison, i32 [[V3]], i32 0 -+; CHECK-NEXT: [[TMP8:%.*]] = shufflevector <4 x i32> [[TMP7]], <4 x i32> poison, <4 x i32> -+; CHECK-NEXT: [[TMP9:%.*]] = zext <2 x i8> [[TMP4]] to <2 x i32> -+; CHECK-NEXT: [[TMP10:%.*]] = call <4 x i32> @llvm.vector.insert.v4i32.v2i32(<4 x i32> [[TMP8]], <2 x i32> [[TMP9]], i64 0) -+; CHECK-NEXT: [[TMP11:%.*]] = uitofp <4 x i32> [[TMP10]] to <4 x float> -+; CHECK-NEXT: [[TMP12:%.*]] = fdiv <4 x float> zeroinitializer, [[TMP11]] -+; CHECK-NEXT: [[TMP13:%.*]] = insertelement <4 x i1> poison, i1 [[V4]], i32 0 -+; CHECK-NEXT: [[TMP14:%.*]] = shufflevector <4 x i1> [[TMP13]], <4 x i1> poison, <4 x i32> -+; CHECK-NEXT: [[TMP15:%.*]] = call <4 x i1> @llvm.vector.insert.v4i1.v2i1(<4 x i1> [[TMP14]], <2 x i1> [[TMP6]], i64 0) -+; CHECK-NEXT: [[TMP16:%.*]] = select <4 x i1> [[TMP15]], <4 x float> zeroinitializer, <4 x float> [[TMP12]] -+; CHECK-NEXT: [[TMP17:%.*]] = extractelement <4 x float> [[TMP16]], i32 3 -+; CHECK-NEXT: [[CONV_I_I1743_3:%.*]] = fptoui float [[TMP17]] to i32 -+; CHECK-NEXT: [[TMP18:%.*]] = icmp ne i32 [[CONV_I_I1743_3]], 0 -+; CHECK-NEXT: [[TMP19:%.*]] = bitcast <4 x float> [[TMP16]] to <4 x i32> -+; CHECK-NEXT: [[TMP20:%.*]] = icmp ult <4 x i32> [[TMP19]], -+; CHECK-NEXT: [[TMP21:%.*]] = extractelement <4 x i1> [[TMP20]], i32 3 -+; CHECK-NEXT: [[NARROW:%.*]] = select i1 [[TMP21]], i1 [[TMP18]], i1 false -+; CHECK-NEXT: [[TMP22:%.*]] = extractelement <4 x float> [[TMP16]], i32 2 -+; CHECK-NEXT: [[CONV_I_I1743_2:%.*]] = fptoui float [[TMP22]] to i32 -+; CHECK-NEXT: [[TMP23:%.*]] = extractelement <4 x i1> [[TMP20]], i32 2 -+; CHECK-NEXT: [[NARROW1:%.*]] = select i1 [[TMP23]], i32 [[CONV_I_I1743_2]], i32 0 -+; CHECK-NEXT: [[TMP24:%.*]] = zext i1 [[NARROW]] to i32 -+; CHECK-NEXT: [[TMP25:%.*]] = or i32 [[NARROW1]], [[TMP24]] -+; CHECK-NEXT: [[TMP26:%.*]] = extractelement <4 x float> [[TMP16]], i32 1 -+; CHECK-NEXT: [[CONV_I_I1743_1:%.*]] = fptoui float [[TMP26]] to i32 -+; CHECK-NEXT: [[TMP27:%.*]] = extractelement <4 x i1> [[TMP20]], i32 1 -+; CHECK-NEXT: [[NARROW2:%.*]] = select i1 [[TMP27]], i32 [[CONV_I_I1743_1]], i32 0 -+; CHECK-NEXT: [[RV3:%.*]] = or i32 [[TMP25]], [[NARROW2]] -+; CHECK-NEXT: [[TMP28:%.*]] = extractelement <4 x float> [[TMP16]], i32 0 -+; CHECK-NEXT: [[CONV_I_I1743:%.*]] = fptoui float [[TMP28]] to i32 -+; CHECK-NEXT: [[TMP29:%.*]] = extractelement <4 x i1> [[TMP20]], i32 0 -+; CHECK-NEXT: [[NARROW4:%.*]] = select i1 [[TMP29]], i32 [[CONV_I_I1743]], i32 0 -+; CHECK-NEXT: [[RT5:%.*]] = or i32 [[RV3]], [[NARROW4]] -+; CHECK-NEXT: [[RT:%.*]] = zext i32 [[RT5]] to i64 -+; CHECK-NEXT: store i64 [[RT]], ptr [[V2]], align 1 -+; CHECK-NEXT: ret i1 false -+; -+newFuncRoot: -+ %conv.i147.i1756.3 = uitofp i32 %v3 to float -+ %div.i.i.i1749.3 = fdiv float 0.000000e+00, %conv.i147.i1756.3 -+ %cond.i.i.i1751.3 = select i1 %v4, float 0.000000e+00, float %div.i.i.i1749.3 -+ %conv.i147.i1756.2 = uitofp i32 %v3 to float -+ %div.i.i.i1749.2 = fdiv float 0.000000e+00, %conv.i147.i1756.2 -+ %cond.i.i.i1751.2 = select i1 %v4, float 0.000000e+00, float %div.i.i.i1749.2 -+ %0 = lshr i64 %v1, 40 -+ %1 = trunc i64 %0 to i32 -+ %tt2 = and i32 %1, 255 -+ %cmp1.i.i.i1746.1 = icmp eq i32 %tt2, 0 -+ %conv.i147.i1756.1 = uitofp i32 %tt2 to float -+ %div.i.i.i1749.1 = fdiv float 0.000000e+00, %conv.i147.i1756.1 -+ %cond.i.i.i1751.1 = select i1 %cmp1.i.i.i1746.1, float 0.000000e+00, float %div.i.i.i1749.1 -+ %tt3 = lshr i64 %v1, 32 -+ %2 = trunc i64 %tt3 to i32 -+ %tt1 = and i32 %2, 1 -+ %cmp1.i.i.i1746 = icmp eq i32 %tt1, 0 -+ %conv.i147.i1756 = uitofp i32 %tt1 to float -+ %div.i.i.i1749 = fdiv float 0.000000e+00, %conv.i147.i1756 -+ %cond.i.i.i1751 = select i1 %cmp1.i.i.i1746, float 0.000000e+00, float %div.i.i.i1749 -+ %3 = bitcast float %cond.i.i.i1751.3 to i32 -+ %cmp.i99.i1736.3 = icmp ult i32 %3, 1333788672 -+ %conv.i.i1743.3 = fptoui float %cond.i.i.i1751.3 to i32 -+ %4 = icmp ne i32 %conv.i.i1743.3, 0 -+ %narrow = select i1 %cmp.i99.i1736.3, i1 %4, i1 false -+ %5 = bitcast float %cond.i.i.i1751.2 to i32 -+ %cmp.i99.i1736.2 = icmp ult i32 %5, 1333788672 -+ %conv.i.i1743.2 = fptoui float %cond.i.i.i1751.2 to i32 -+ %narrow1 = select i1 %cmp.i99.i1736.2, i32 %conv.i.i1743.2, i32 0 -+ %6 = zext i1 %narrow to i32 -+ %7 = or i32 %narrow1, %6 -+ %8 = bitcast float %cond.i.i.i1751.1 to i32 -+ %cmp.i99.i1736.1 = icmp ult i32 %8, 1333788672 -+ %conv.i.i1743.1 = fptoui float %cond.i.i.i1751.1 to i32 -+ %narrow2 = select i1 %cmp.i99.i1736.1, i32 %conv.i.i1743.1, i32 0 -+ %rv3 = or i32 %7, %narrow2 -+ %9 = bitcast float %cond.i.i.i1751 to i32 -+ %cmp.i99.i1736 = icmp ult i32 %9, 1333788672 -+ %conv.i.i1743 = fptoui float %cond.i.i.i1751 to i32 -+ %narrow4 = select i1 %cmp.i99.i1736, i32 %conv.i.i1743, i32 0 -+ %rt5 = or i32 %rv3, %narrow4 -+ %rt = zext i32 %rt5 to i64 -+ store i64 %rt, ptr %v2, align 1 -+ ret i1 false -+} -diff -ruN --strip-trailing-cr a/mlir/lib/Dialect/Tensor/Utils/Utils.cpp b/mlir/lib/Dialect/Tensor/Utils/Utils.cpp ---- a/mlir/lib/Dialect/Tensor/Utils/Utils.cpp -+++ b/mlir/lib/Dialect/Tensor/Utils/Utils.cpp -@@ -16,7 +16,7 @@ - #include "mlir/Dialect/Arith/IR/Arith.h" - #include "mlir/Dialect/Arith/Utils/Utils.h" - #include "mlir/Dialect/Utils/IndexingUtils.h" --#include "mlir/Dialect/Vector/IR//VectorOps.h" -+#include "mlir/Dialect/Vector/IR/VectorOps.h" - #include "mlir/Interfaces/ValueBoundsOpInterface.h" - - using namespace mlir; + TEST_CONSTEXPR_CXX23 bool test() { + // Basic test + { +@@ -112,12 +117,33 @@ + WithNonTrivialDtor<16>, + WithNonTrivialDtor<256>>; + types::for_each(TrickyCookieTypes(), [] { +- types::for_each(types::type_list, CustomDeleter>(), [] { +- std::unique_ptr p(new T[3]); ++ // Array allocated with `new T[n]`, default deleter ++ { ++ std::unique_ptr> p(new T[3]); ++ assert(p[0] == T()); ++ assert(p[1] == T()); ++ assert(p[2] == T()); ++ } ++ ++ // Array allocated with `new T[n]`, custom deleter ++ { ++ std::unique_ptr> p(new T[3]); ++ assert(p[0] == T()); ++ assert(p[1] == T()); ++ assert(p[2] == T()); ++ } ++ ++ // Array not allocated with `new T[n]`, custom deleter ++ // ++ // This test aims to ensure that the implementation doesn't try to use an array cookie ++ // when there is none. ++ { ++ T array[50] = {}; ++ std::unique_ptr p(&array[0]); + assert(p[0] == T()); + assert(p[1] == T()); + assert(p[2] == T()); +- }); ++ } + }); + } + #endif // C++20 +diff -ruN --strip-trailing-cr a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp +--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp ++++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp +@@ -20,11 +20,7 @@ + // Pre-D128285 layout. + #define PACKED_ANON_STRUCT + #endif +-#if REVISION <= 4 +-// Pre-2a1ef74 layout. +-#define NON_STANDARD_PADDING +-#endif +-// REVISION == 5: current layout ++// REVISION == 4: current layout + + #ifdef PACKED_ANON_STRUCT + #define BEGIN_PACKED_ANON_STRUCT struct __attribute__((packed)) { +@@ -38,7 +34,6 @@ + namespace std { + namespace __lldb { + +-#ifdef NON_STANDARD_PADDING + #if defined(ALTERNATE_LAYOUT) && defined(SUBCLASS_PADDING) + template struct __padding { + unsigned char __xx[sizeof(_CharT) - 1]; +@@ -46,13 +41,6 @@ + + template struct __padding<_CharT, 1> {}; + #endif +-#else // !NON_STANDARD_PADDING +-template struct __padding { +- char __padding_[_PaddingSize]; +-}; +- +-template <> struct __padding<0> {}; +-#endif + + template class basic_string { + public: +@@ -89,12 +77,7 @@ + }; + #else // !SUBCLASS_PADDING + +-#ifdef NON_STANDARD_PADDING + unsigned char __padding[sizeof(value_type) - 1]; +-#else +- [[no_unique_address]] __padding __padding_; +-#endif +- + #ifdef BITMASKS + unsigned char __size_; + #else // !BITMASKS +@@ -146,26 +129,21 @@ + union { + #ifdef BITMASKS + unsigned char __size_; +-#else // !BITMASKS ++#else + struct { + unsigned char __is_long_ : 1; + unsigned char __size_ : 7; + }; +-#endif // BITMASKS ++#endif + value_type __lx; + }; +-#else // !SHORT_UNION ++#else + BEGIN_PACKED_ANON_STRUCT + unsigned char __is_long_ : 1; + unsigned char __size_ : 7; + END_PACKED_ANON_STRUCT +-#ifdef NON_STANDARD_PADDING +- unsigned char __padding[sizeof(value_type) - 1]; +-#else // !NON_STANDARD_PADDING +- [[no_unique_address]] __padding __padding_; +-#endif // NON_STANDARD_PADDING +- +-#endif // SHORT_UNION ++ char __padding_[sizeof(value_type) - 1]; ++#endif + value_type __data_[__min_cap]; + }; + +diff -ruN --strip-trailing-cr a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py +--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py ++++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py +@@ -27,7 +27,7 @@ + + + for v in [None, "ALTERNATE_LAYOUT"]: +- for r in range(6): ++ for r in range(5): + for c in range(3): + name = "test_r%d_c%d" % (r, c) + defines = ["REVISION=%d" % r, "COMPRESSED_PAIR_REV=%d" % c] diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -175,33 +358,3 @@ diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/BUILD.baze ) libc_support_library( -diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel ---- a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel -+++ b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel -@@ -1091,6 +1091,7 @@ - "//lldb:Utility", - "//lldb:UtilityPrivateHeaders", - "//llvm:Core", -+ "//llvm:Support", - "//llvm:TargetParser", - ], - ) -diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel ---- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel -+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel -@@ -7694,6 +7694,7 @@ - ":DialectUtils", - ":TensorDialect", - ":ValueBoundsOpInterface", -+ ":VectorDialect", - ], - ) - -@@ -13902,6 +13903,7 @@ - ":BufferViewFlowOpInterfaceIncGen", - ":BufferizableOpInterfaceIncGen", - ":BufferizationEnumsIncGen", -+ ":FunctionInterfaces", - ":IR", - ":Support", - "//llvm:Support", diff --git a/third_party/llvm/workspace.bzl b/third_party/llvm/workspace.bzl index 6b843a7d6..50e3160ca 100644 --- a/third_party/llvm/workspace.bzl +++ b/third_party/llvm/workspace.bzl @@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" - LLVM_COMMIT = "68c04b0ae62d8431d72d8b47fc13008002ee4387" - LLVM_SHA256 = "90b9b631d6670a99d22e022d180f2877bf523cf9c6dc05876a6912dfd1a3e332" + LLVM_COMMIT = "82f5acfbec65e1a645d902f746253eeaf0bd2d70" + LLVM_SHA256 = "c621acf6f202cfcbd0c73f381272b70c51c95f0ecb62c17d2d5fe0156a80082a" tf_http_archive( name = name,