-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate LLVM at llvm/llvm-project@80aa52d8c5a8
Updates LLVM usage to match [80aa52d8c5a8](llvm/llvm-project@80aa52d8c5a8) PiperOrigin-RevId: 620285862
- Loading branch information
1 parent
24fc9c0
commit d55afd1
Showing
4 changed files
with
4 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,207 +1 @@ | ||
Auto generated patch. Do not edit or delete it, even if empty. | ||
diff -ruN --strip-trailing-cr a/clang/lib/APINotes/APINotesWriter.cpp b/clang/lib/APINotes/APINotesWriter.cpp | ||
--- a/clang/lib/APINotes/APINotesWriter.cpp | ||
+++ b/clang/lib/APINotes/APINotesWriter.cpp | ||
@@ -441,7 +441,7 @@ | ||
std::sort(VI.begin(), VI.end(), | ||
[](const std::pair<VersionTuple, T> &LHS, | ||
const std::pair<VersionTuple, T> &RHS) -> bool { | ||
- assert(LHS.first != RHS.first && | ||
+ assert((&LHS == &RHS || LHS.first != RHS.first) && | ||
"two entries for the same version"); | ||
return LHS.first < RHS.first; | ||
}); | ||
diff -ruN --strip-trailing-cr a/clang/test/APINotes/module-cache.m b/clang/test/APINotes/module-cache.m | ||
--- a/clang/test/APINotes/module-cache.m | ||
+++ b/clang/test/APINotes/module-cache.m | ||
@@ -27,6 +27,7 @@ | ||
// RUN: FileCheck -check-prefix=CHECK-ONE-ERROR %s < %t/before.log | ||
|
||
// Change the API notes file, after the module has rebuilt once. | ||
+// RUN: chmod u+w %t/APINotes/SomeOtherKit.apinotes | ||
// RUN: echo ' - Selector: "methodA"' >> %t/APINotes/SomeOtherKit.apinotes | ||
// RUN: echo ' MethodKind: Instance' >> %t/APINotes/SomeOtherKit.apinotes | ||
// RUN: echo ' Availability: none' >> %t/APINotes/SomeOtherKit.apinotes | ||
diff -ruN --strip-trailing-cr a/lld/test/ELF/lto/libcall-archive.ll b/lld/test/ELF/lto/libcall-archive.ll | ||
--- a/lld/test/ELF/lto/libcall-archive.ll | ||
+++ b/lld/test/ELF/lto/libcall-archive.ll | ||
@@ -4,8 +4,8 @@ | ||
; RUN: llvm-as -o %t2.o %S/Inputs/libcall-archive.ll | ||
; RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -o %t3.o %S/Inputs/libcall-archive.s | ||
; RUN: llvm-ar rcs %t.a %t2.o %t3.o | ||
-; RUN: ld.lld --why-extract=why.txt -o %t %t.o %t.a | ||
-; RUN: FileCheck %s --input-file=why.txt --check-prefix=CHECK-WHY | ||
+; RUN: ld.lld --why-extract=%t.why.txt -o %t %t.o %t.a | ||
+; RUN: FileCheck %s --input-file=%t.why.txt --check-prefix=CHECK-WHY | ||
; RUN: llvm-nm %t | FileCheck %s | ||
; RUN: ld.lld -o %t2 %t.o --start-lib %t2.o %t3.o --end-lib | ||
; RUN: llvm-nm %t2 | FileCheck %s | ||
diff -ruN --strip-trailing-cr a/llvm/include/llvm/IR/Verifier.h b/llvm/include/llvm/IR/Verifier.h | ||
--- a/llvm/include/llvm/IR/Verifier.h | ||
+++ b/llvm/include/llvm/IR/Verifier.h | ||
@@ -77,7 +77,6 @@ | ||
/// Visit an instruction and return true if it is valid, return false if an | ||
/// invalid TBAA is attached. | ||
bool visitTBAAMetadata(Instruction &I, const MDNode *MD); | ||
- bool visitTBAAStructMetadata(Instruction &I, const MDNode *MD); | ||
}; | ||
|
||
/// Check a function for errors, useful for use when debugging a | ||
diff -ruN --strip-trailing-cr a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp | ||
--- a/llvm/lib/IR/Verifier.cpp | ||
+++ b/llvm/lib/IR/Verifier.cpp | ||
@@ -5096,9 +5096,6 @@ | ||
if (MDNode *TBAA = I.getMetadata(LLVMContext::MD_tbaa)) | ||
TBAAVerifyHelper.visitTBAAMetadata(I, TBAA); | ||
|
||
- if (MDNode *TBAA = I.getMetadata(LLVMContext::MD_tbaa_struct)) | ||
- TBAAVerifyHelper.visitTBAAStructMetadata(I, TBAA); | ||
- | ||
if (MDNode *MD = I.getMetadata(LLVMContext::MD_noalias)) | ||
visitAliasScopeListMetadata(MD); | ||
if (MDNode *MD = I.getMetadata(LLVMContext::MD_alias_scope)) | ||
@@ -7422,35 +7419,6 @@ | ||
return true; | ||
} | ||
|
||
-bool TBAAVerifier::visitTBAAStructMetadata(Instruction &I, const MDNode *MD) { | ||
- CheckTBAA(MD->getNumOperands() % 3 == 0, | ||
- "tbaa.struct operands must occur in groups of three", &I, MD); | ||
- | ||
- // Each group of three operands must consist of two integers and a | ||
- // tbaa node. Moreover, the regions described by the offset and size | ||
- // operands must be non-overlapping. | ||
- std::optional<APInt> NextFree; | ||
- for (unsigned int Idx = 0; Idx < MD->getNumOperands(); Idx += 3) { | ||
- auto *OffsetCI = | ||
- mdconst::dyn_extract_or_null<ConstantInt>(MD->getOperand(Idx)); | ||
- CheckTBAA(OffsetCI, "Offset must be a constant integer", &I, MD); | ||
- | ||
- auto *SizeCI = | ||
- mdconst::dyn_extract_or_null<ConstantInt>(MD->getOperand(Idx + 1)); | ||
- CheckTBAA(SizeCI, "Size must be a constant integer", &I, MD); | ||
- | ||
- MDNode *TBAA = dyn_cast_or_null<MDNode>(MD->getOperand(Idx + 2)); | ||
- CheckTBAA(TBAA, "TBAA tag missing", &I, MD); | ||
- visitTBAAMetadata(I, TBAA); | ||
- | ||
- bool NonOverlapping = !NextFree || NextFree->ule(OffsetCI->getValue()); | ||
- CheckTBAA(NonOverlapping, "Overlapping tbaa.struct regions", &I, MD); | ||
- | ||
- NextFree = OffsetCI->getValue() + SizeCI->getValue(); | ||
- } | ||
- return true; | ||
-} | ||
- | ||
char VerifierLegacyPass::ID = 0; | ||
INITIALIZE_PASS(VerifierLegacyPass, "verify", "Module Verifier", false, false) | ||
|
||
diff -ruN --strip-trailing-cr a/llvm/test/CodeGen/AArch64/arm64-abi_align.ll b/llvm/test/CodeGen/AArch64/arm64-abi_align.ll | ||
--- a/llvm/test/CodeGen/AArch64/arm64-abi_align.ll | ||
+++ b/llvm/test/CodeGen/AArch64/arm64-abi_align.ll | ||
@@ -518,6 +518,4 @@ | ||
!1 = !{!"omnipotent char", !2} | ||
!2 = !{!"Simple C/C++ TBAA"} | ||
!3 = !{!"short", !1} | ||
-!4 = !{i64 0, i64 4, !5, i64 4, i64 2, !6, i64 8, i64 4, !5, i64 12, i64 2, !6, i64 16, i64 4, !5, i64 20, i64 2, !6} | ||
-!5 = !{!0, !0, i64 0} | ||
-!6 = !{!3, !3, i64 0} | ||
+!4 = !{i64 0, i64 4, !0, i64 4, i64 2, !3, i64 8, i64 4, !0, i64 12, i64 2, !3, i64 16, i64 4, !0, i64 20, i64 2, !3} | ||
diff -ruN --strip-trailing-cr a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll | ||
--- a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll | ||
+++ b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll | ||
@@ -141,4 +141,4 @@ | ||
!5 = distinct !{!5, !"some domain"} | ||
!6 = !{!7} | ||
!7 = distinct !{!7, !5, !"some scope 2"} | ||
-!8 = !{i64 0, i64 8, !0} | ||
+!8 = !{i64 0, i64 8, null} | ||
diff -ruN --strip-trailing-cr a/llvm/test/Transforms/InstCombine/struct-assign-tbaa.ll b/llvm/test/Transforms/InstCombine/struct-assign-tbaa.ll | ||
--- a/llvm/test/Transforms/InstCombine/struct-assign-tbaa.ll | ||
+++ b/llvm/test/Transforms/InstCombine/struct-assign-tbaa.ll | ||
@@ -75,7 +75,7 @@ | ||
!1 = !{!"omnipotent char", !0} | ||
!2 = !{!5, !5, i64 0} | ||
!3 = !{i64 0, i64 4, !2} | ||
-!4 = !{i64 0, i64 8, !2} | ||
+!4 = !{i64 0, i64 8, null} | ||
!5 = !{!"float", !0} | ||
!6 = !{i64 0, i64 4, !2, i64 4, i64 4, !2} | ||
!7 = !{i64 0, i64 2, !2, i64 4, i64 6, !2} | ||
diff -ruN --strip-trailing-cr a/llvm/test/Transforms/Scalarizer/basic-inseltpoison.ll b/llvm/test/Transforms/Scalarizer/basic-inseltpoison.ll | ||
--- a/llvm/test/Transforms/Scalarizer/basic-inseltpoison.ll | ||
+++ b/llvm/test/Transforms/Scalarizer/basic-inseltpoison.ll | ||
@@ -836,6 +836,5 @@ | ||
!2 = !{ !"set2", !0 } | ||
!3 = !{ !3, !{!"llvm.loop.parallel_accesses", !13} } | ||
!4 = !{ float 4.0 } | ||
-!5 = !{ i64 0, i64 8, !6 } | ||
-!6 = !{ !1, !1, i64 0 } | ||
+!5 = !{ i64 0, i64 8, null } | ||
!13 = distinct !{} | ||
diff -ruN --strip-trailing-cr a/llvm/test/Transforms/Scalarizer/basic.ll b/llvm/test/Transforms/Scalarizer/basic.ll | ||
--- a/llvm/test/Transforms/Scalarizer/basic.ll | ||
+++ b/llvm/test/Transforms/Scalarizer/basic.ll | ||
@@ -870,6 +870,5 @@ | ||
!2 = !{ !"set2", !0 } | ||
!3 = !{ !3, !{!"llvm.loop.parallel_accesses", !13} } | ||
!4 = !{ float 4.0 } | ||
-!5 = !{ i64 0, i64 8, !6 } | ||
-!6 = !{ !1, !1, i64 0 } | ||
+!5 = !{ i64 0, i64 8, null } | ||
!13 = distinct !{} | ||
diff -ruN --strip-trailing-cr a/llvm/test/Transforms/SROA/tbaa-struct3.ll b/llvm/test/Transforms/SROA/tbaa-struct3.ll | ||
--- a/llvm/test/Transforms/SROA/tbaa-struct3.ll | ||
+++ b/llvm/test/Transforms/SROA/tbaa-struct3.ll | ||
@@ -539,7 +539,7 @@ | ||
!6 = !{!5, !5, i64 0} | ||
!7 = !{i64 0, i64 8, !6, i64 8, i64 4, !1} | ||
!8 = !{i64 0, i64 4, !1, i64 4, i64 8, !6} | ||
-!9 = !{i64 0, i64 8, !6, i64 8, i64 8, !1} | ||
+!9 = !{i64 0, i64 8, !6, i64 4, i64 8, !1} | ||
!10 = !{i64 0, i64 2, !1, i64 2, i64 2, !1} | ||
!11 = !{i64 0, i64 1, !1, i64 1, i64 3, !1} | ||
!12 = !{i64 0, i64 2, !1, i64 2, i64 6, !1} | ||
diff -ruN --strip-trailing-cr a/llvm/test/Verifier/tbaa-struct.ll b/llvm/test/Verifier/tbaa-struct.ll | ||
--- a/llvm/test/Verifier/tbaa-struct.ll | ||
+++ b/llvm/test/Verifier/tbaa-struct.ll | ||
@@ -1,36 +1,28 @@ | ||
-; RUN: not llvm-as < %s 2>&1 | FileCheck %s | ||
+; RUN: llvm-as < %s 2>&1 | ||
+ | ||
+; FIXME: The verifer should reject the invalid !tbaa.struct nodes below. | ||
|
||
define void @test_overlapping_regions(ptr %a1) { | ||
-; CHECK: Overlapping tbaa.struct regions | ||
-; CHECK-NEXT: %ld = load i8, ptr %a1, align 1, !tbaa.struct !0 | ||
%ld = load i8, ptr %a1, align 1, !tbaa.struct !0 | ||
ret void | ||
} | ||
|
||
define void @test_size_not_integer(ptr %a1) { | ||
-; CHECK: Size must be a constant integer | ||
-; CHECK-NEXT: store i8 1, ptr %a1, align 1, !tbaa.struct !5 | ||
store i8 1, ptr %a1, align 1, !tbaa.struct !5 | ||
ret void | ||
} | ||
|
||
define void @test_offset_not_integer(ptr %a1, ptr %a2) { | ||
-; CHECK: Offset must be a constant integer | ||
-; CHECK-NEXT: tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %a1, ptr align 8 %a2, i64 16, i1 false), !tbaa.struct !6 | ||
tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %a1, ptr align 8 %a2, i64 16, i1 false), !tbaa.struct !6 | ||
ret void | ||
} | ||
|
||
define void @test_tbaa_missing(ptr %a1, ptr %a2) { | ||
-; CHECK: TBAA tag missing | ||
-; CHECK-NEXT: tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %a1, ptr align 8 %a2, i64 16, i1 false), !tbaa.struct !7 | ||
tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %a1, ptr align 8 %a2, i64 16, i1 false), !tbaa.struct !7 | ||
ret void | ||
} | ||
|
||
define void @test_tbaa_invalid(ptr %a1) { | ||
-; CHECK: Old-style TBAA is no longer allowed, use struct-path TBAA instead | ||
-; CHECK-NEXT: store i8 1, ptr %a1, align 1, !tbaa.struct !8 | ||
store i8 1, ptr %a1, align 1, !tbaa.struct !8 | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.