[clang] [KeyInstr][Clang] Agg init atom (PR #134635)
Orlando Cazalet-Hyams via cfe-commits
cfe-commits at lists.llvm.org
Thu May 22 05:46:59 PDT 2025
https://github.com/OCHyams updated https://github.com/llvm/llvm-project/pull/134635
>From c4029c3503f565ab6c2faa9cdec129c79133ff4f Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Tue, 1 Apr 2025 15:40:58 +0100
Subject: [PATCH 1/7] [KeyInstr][Clang] Agg init atom
This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.
The Key Instructions project is introduced, including a "quick summary" section
at the top which adds context for this PR, here:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668
The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.
The Clang-side work is demoed here:
https://github.com/llvm/llvm-project/pull/130943
---
clang/lib/CodeGen/CGDecl.cpp | 2 ++
.../DebugInfo/KeyInstructions/init-agg.cpp | 22 +++++++++++++++++++
2 files changed, 24 insertions(+)
create mode 100644 clang/test/DebugInfo/KeyInstructions/init-agg.cpp
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index d02f2ad09d2f1..8d43d531f6043 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -1270,6 +1270,8 @@ void CodeGenFunction::emitStoresForConstant(const VarDecl &D, Address Loc,
createUnnamedGlobalForMemcpyFrom(
CGM, D, Builder, constant, Loc.getAlignment()),
SizeVal, isVolatile);
+ addInstToCurrentSourceAtom(I, nullptr);
+
if (IsAutoInit)
I->addAnnotationMetadata("auto-init");
}
diff --git a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
new file mode 100644
index 0000000000000..b96256b532f3e
--- /dev/null
+++ b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
@@ -0,0 +1,22 @@
+
+// RUN: %clang -gkey-instructions %s -gmlt -S -emit-llvm -o - \
+// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
+
+// The implicit-check-not is important; we don't want the GEPs created for the
+// store locations to be included in the atom group.
+
+int g;
+void a() {
+// CHECK: _Z1av()
+// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G1R1:!.*]]
+ int A[] = { 1, 2, 3 };
+// CHECK: store i32 1, ptr %{{.*}}, !dbg [[G2R1:!.*]]
+// CHECK: store i32 2, ptr %{{.*}}, !dbg [[G2R1]]
+// CHECK: %0 = load i32, ptr @g{{.*}}, !dbg [[G2R2:!.*]]
+// CHECK: store i32 %0, ptr %{{.*}}, !dbg [[G2R1]]
+ int B[] = { 1, 2, g };
+}
+
+// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
+// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
+// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
>From d946e31203b07c88d1ade65677a3b2d87adf533e Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Tue, 1 Apr 2025 16:45:47 +0100
Subject: [PATCH 2/7] shouldUseBZeroPlusStoresToInitialize
---
clang/lib/CodeGen/CGDecl.cpp | 3 +++
clang/test/DebugInfo/KeyInstructions/init-agg.cpp | 12 +++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 8d43d531f6043..bb13c31f8f5e4 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -945,6 +945,7 @@ void CodeGenFunction::emitStoresForInitAfterBZero(llvm::Constant *Init,
isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) ||
isa<llvm::ConstantExpr>(Init)) {
auto *I = Builder.CreateStore(Init, Loc, isVolatile);
+ addInstToCurrentSourceAtom(I, nullptr);
if (IsAutoInit)
I->addAnnotationMetadata("auto-init");
return;
@@ -1200,6 +1201,8 @@ void CodeGenFunction::emitStoresForConstant(const VarDecl &D, Address Loc,
if (shouldUseBZeroPlusStoresToInitialize(constant, ConstantSize)) {
auto *I = Builder.CreateMemSet(Loc, llvm::ConstantInt::get(CGM.Int8Ty, 0),
SizeVal, isVolatile);
+ addInstToCurrentSourceAtom(I, nullptr);
+
if (IsAutoInit)
I->addAnnotationMetadata("auto-init");
diff --git a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
index b96256b532f3e..854af3237ed98 100644
--- a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
@@ -1,22 +1,32 @@
-// RUN: %clang -gkey-instructions %s -gmlt -S -emit-llvm -o - \
+// RUN: %clang -gkey-instructions %s -gmlt -gno-column-info -S -emit-llvm -o - \
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
// The implicit-check-not is important; we don't want the GEPs created for the
// store locations to be included in the atom group.
int g;
+char gc;
void a() {
// CHECK: _Z1av()
// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G1R1:!.*]]
int A[] = { 1, 2, 3 };
+
// CHECK: store i32 1, ptr %{{.*}}, !dbg [[G2R1:!.*]]
// CHECK: store i32 2, ptr %{{.*}}, !dbg [[G2R1]]
// CHECK: %0 = load i32, ptr @g{{.*}}, !dbg [[G2R2:!.*]]
// CHECK: store i32 %0, ptr %{{.*}}, !dbg [[G2R1]]
int B[] = { 1, 2, g };
+
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[G3R1:!.*]]
+// CHECK: store i8 97{{.*}}, !dbg [[G3R1]]
+// CHECK: store i8 98{{.*}}, !dbg [[G3R1]]
+// CHECK: store i8 99{{.*}}, !dbg [[G3R1]]
+// CHECK: store i8 100{{.*}}, !dbg [[G3R1]]
+ char big[65536] = { 'a', 'b', 'c', 'd' };
}
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
+// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
\ No newline at end of file
>From 355b398dddff5193d1b5b44483967a01b3722d5c Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Tue, 1 Apr 2025 17:08:43 +0100
Subject: [PATCH 3/7] [KeyInstr] init-agg pattern
---
clang/lib/CodeGen/CGDecl.cpp | 1 +
clang/test/DebugInfo/KeyInstructions/init-agg.cpp | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index bb13c31f8f5e4..47d963123021b 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -1227,6 +1227,7 @@ void CodeGenFunction::emitStoresForConstant(const VarDecl &D, Address Loc,
}
auto *I = Builder.CreateMemSet(
Loc, llvm::ConstantInt::get(CGM.Int8Ty, Value), SizeVal, isVolatile);
+ addInstToCurrentSourceAtom(I, nullptr);
if (IsAutoInit)
I->addAnnotationMetadata("auto-init");
return;
diff --git a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
index 854af3237ed98..e2f12d73a4ecd 100644
--- a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
@@ -6,7 +6,6 @@
// store locations to be included in the atom group.
int g;
-char gc;
void a() {
// CHECK: _Z1av()
// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G1R1:!.*]]
@@ -24,9 +23,13 @@ void a() {
// CHECK: store i8 99{{.*}}, !dbg [[G3R1]]
// CHECK: store i8 100{{.*}}, !dbg [[G3R1]]
char big[65536] = { 'a', 'b', 'c', 'd' };
+
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[G4R1:!.*]]
+ char arr[] = { 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, };
}
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
-// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
\ No newline at end of file
+// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
+// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
>From c23c95bba9a7f71c521156c42adab8be5ac85b35 Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Wed, 2 Apr 2025 09:54:30 +0100
Subject: [PATCH 4/7] [KeyInstr][Clang] Init pattern atom
---
clang/lib/CodeGen/CGDecl.cpp | 1 +
clang/test/DebugInfo/KeyInstructions/init-agg.cpp | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 47d963123021b..18135384021e8 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -1189,6 +1189,7 @@ void CodeGenFunction::emitStoresForConstant(const VarDecl &D, Address Loc,
Ty->isPtrOrPtrVectorTy() || Ty->isFPOrFPVectorTy();
if (canDoSingleStore) {
auto *I = Builder.CreateStore(constant, Loc, isVolatile);
+ addInstToCurrentSourceAtom(I, nullptr);
if (IsAutoInit)
I->addAnnotationMetadata("auto-init");
return;
diff --git a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
index e2f12d73a4ecd..f0cc67e659d95 100644
--- a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang -gkey-instructions %s -gmlt -gno-column-info -S -emit-llvm -o - \
+// RUN: %clang -gkey-instructions %s -gmlt -gno-column-info -S -emit-llvm -o - -ftrivial-auto-var-init=pattern \
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
// The implicit-check-not is important; we don't want the GEPs created for the
@@ -26,6 +26,9 @@ void a() {
// CHECK: call void @llvm.memset{{.*}}, !dbg [[G4R1:!.*]]
char arr[] = { 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, };
+
+// CHECK: store i8 -86, ptr %uninit{{.*}}, !dbg [[G5R1:!.*]], !annotation
+ char uninit; // -ftrivial-auto-var-init=pattern
}
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
@@ -33,3 +36,4 @@ void a() {
// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
+// CHECK: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
>From e8358f3d11f29553fd2e666c0809e02bafe1d96e Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Wed, 21 May 2025 11:24:57 +0100
Subject: [PATCH 5/7] use %clang_cc1
---
clang/test/DebugInfo/KeyInstructions/init-agg.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
index f0cc67e659d95..e5025e51c1df3 100644
--- a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang -gkey-instructions %s -gmlt -gno-column-info -S -emit-llvm -o - -ftrivial-auto-var-init=pattern \
+// RUN: %clang_cc1 -gkey-instructions %s -debug-info-kind=line-tables-only -gno-column-info -emit-llvm -o - -ftrivial-auto-var-init=pattern \
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
// The implicit-check-not is important; we don't want the GEPs created for the
>From 0b4f95cc8fb642056ec46eb78759ed5ef37b226b Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Wed, 21 May 2025 11:49:48 +0100
Subject: [PATCH 6/7] test nits
---
.../DebugInfo/KeyInstructions/init-agg.cpp | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
index e5025e51c1df3..d3310b68429bc 100644
--- a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
@@ -8,20 +8,25 @@
int g;
void a() {
// CHECK: _Z1av()
-// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G1R1:!.*]]
+// CHECK: call void @llvm.memcpy{{.*}}%A, {{.*}}@__const._Z1av.A{{.*}}, !dbg [[G1R1:!.*]]
int A[] = { 1, 2, 3 };
+// CHECK: call void @llvm.memcpy{{.*}}%B, {{.*}}@__const._Z1av.B{{.*}}, !dbg [[G2R1:!.*]]
// CHECK: store i32 1, ptr %{{.*}}, !dbg [[G2R1:!.*]]
// CHECK: store i32 2, ptr %{{.*}}, !dbg [[G2R1]]
// CHECK: %0 = load i32, ptr @g{{.*}}, !dbg [[G2R2:!.*]]
// CHECK: store i32 %0, ptr %{{.*}}, !dbg [[G2R1]]
int B[] = { 1, 2, g };
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G3R1:!.*]]
-// CHECK: store i8 97{{.*}}, !dbg [[G3R1]]
-// CHECK: store i8 98{{.*}}, !dbg [[G3R1]]
-// CHECK: store i8 99{{.*}}, !dbg [[G3R1]]
-// CHECK: store i8 100{{.*}}, !dbg [[G3R1]]
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[G3R1:!.*]]
+// CHECK-NEXT: %1 = getelementptr {{.*}}, ptr %big, i32 0, i32 0, !dbg [[LINE30:!.*]]
+// CHECK-NEXT: store i8 97, ptr %1{{.*}}, !dbg [[G3R1]]
+// CHECK-NEXT: %2 = getelementptr {{.*}}, ptr %big, i32 0, i32 1, !dbg [[LINE30]]
+// CHECK-NEXT: store i8 98, ptr %2{{.*}} !dbg [[G3R1]]
+// CHECK-NEXT: %3 = getelementptr {{.*}}, ptr %big, i32 0, i32 2, !dbg [[LINE30]]
+// CHECK-NEXT: store i8 99, ptr %3{{.*}} !dbg [[G3R1]]
+// CHECK-NEXT: %4 = getelementptr {{.*}}, ptr %big, i32 0, i32 3, !dbg [[LINE30]]
+// CHECK: store i8 100, ptr %4{{.*}} !dbg [[G3R1]]
char big[65536] = { 'a', 'b', 'c', 'd' };
// CHECK: call void @llvm.memset{{.*}}, !dbg [[G4R1:!.*]]
@@ -35,5 +40,6 @@ void a() {
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
+// CHECK: [[LINE30]] = !DILocation(line: 30, scope: ![[#]])
// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
// CHECK: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
>From 9dbcce27b0285c9133aaf3679aebb873796f0af0 Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Wed, 21 May 2025 14:36:21 +0100
Subject: [PATCH 7/7] improve test a bit more
---
.../DebugInfo/KeyInstructions/init-agg.cpp | 31 ++++++++++---------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
index d3310b68429bc..5446aae155d63 100644
--- a/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
+++ b/clang/test/DebugInfo/KeyInstructions/init-agg.cpp
@@ -11,25 +11,27 @@ void a() {
// CHECK: call void @llvm.memcpy{{.*}}%A, {{.*}}@__const._Z1av.A{{.*}}, !dbg [[G1R1:!.*]]
int A[] = { 1, 2, 3 };
-// CHECK: call void @llvm.memcpy{{.*}}%B, {{.*}}@__const._Z1av.B{{.*}}, !dbg [[G2R1:!.*]]
-// CHECK: store i32 1, ptr %{{.*}}, !dbg [[G2R1:!.*]]
-// CHECK: store i32 2, ptr %{{.*}}, !dbg [[G2R1]]
-// CHECK: %0 = load i32, ptr @g{{.*}}, !dbg [[G2R2:!.*]]
-// CHECK: store i32 %0, ptr %{{.*}}, !dbg [[G2R1]]
+// CHECK: call void @llvm.memcpy{{.*}}%B, {{.*}}@__const._Z1av.B{{.*}}, !dbg [[G2R1:!.*]]
+// CHECK-NEXT: store i32 1, ptr %B{{.*}}, !dbg [[G2R1:!.*]]
+// CHECK-NEXT: %arrayinit.element = getelementptr {{.*}}, ptr %B, i64 1, !dbg [[B_LINE:!.*]]
+// CHECK-NEXT: store i32 2, ptr %arrayinit.element{{.*}}, !dbg [[G2R1]]
+// CHECK-NEXT: %arrayinit.element1 = getelementptr {{.*}}, ptr %B, i64 2, !dbg [[B_LINE]]
+// CHECK-NEXT: %0 = load i32, ptr @g{{.*}}, !dbg [[G2R2:!.*]]
+// CHECK-NEXT: store i32 %0, ptr %arrayinit.element1{{.*}}, !dbg [[G2R1]]
int B[] = { 1, 2, g };
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G3R1:!.*]]
-// CHECK-NEXT: %1 = getelementptr {{.*}}, ptr %big, i32 0, i32 0, !dbg [[LINE30:!.*]]
+// CHECK: call void @llvm.memset{{.*}}%big{{.*}} !dbg [[G3R1:!.*]]
+// CHECK-NEXT: %1 = getelementptr {{.*}}, ptr %big, i32 0, i32 0, !dbg [[big_LINE:!.*]]
// CHECK-NEXT: store i8 97, ptr %1{{.*}}, !dbg [[G3R1]]
-// CHECK-NEXT: %2 = getelementptr {{.*}}, ptr %big, i32 0, i32 1, !dbg [[LINE30]]
-// CHECK-NEXT: store i8 98, ptr %2{{.*}} !dbg [[G3R1]]
-// CHECK-NEXT: %3 = getelementptr {{.*}}, ptr %big, i32 0, i32 2, !dbg [[LINE30]]
-// CHECK-NEXT: store i8 99, ptr %3{{.*}} !dbg [[G3R1]]
-// CHECK-NEXT: %4 = getelementptr {{.*}}, ptr %big, i32 0, i32 3, !dbg [[LINE30]]
+// CHECK-NEXT: %2 = getelementptr {{.*}}, ptr %big, i32 0, i32 1, !dbg [[big_LINE]]
+// CHECK-NEXT: store i8 98, ptr %2{{.*}}, !dbg [[G3R1]]
+// CHECK-NEXT: %3 = getelementptr {{.*}}, ptr %big, i32 0, i32 2, !dbg [[big_LINE]]
+// CHECK-NEXT: store i8 99, ptr %3{{.*}}, !dbg [[G3R1]]
+// CHECK-NEXT: %4 = getelementptr {{.*}}, ptr %big, i32 0, i32 3, !dbg [[big_LINE]]
// CHECK: store i8 100, ptr %4{{.*}} !dbg [[G3R1]]
char big[65536] = { 'a', 'b', 'c', 'd' };
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G4R1:!.*]]
+// CHECK: call void @llvm.memset{{.*}}%arr{{.*}}, !dbg [[G4R1:!.*]]
char arr[] = { 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, };
// CHECK: store i8 -86, ptr %uninit{{.*}}, !dbg [[G5R1:!.*]], !annotation
@@ -38,8 +40,9 @@ void a() {
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
+// CHECK: [[B_LINE]] = !DILocation(line: 21, scope: ![[#]])
// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
-// CHECK: [[LINE30]] = !DILocation(line: 30, scope: ![[#]])
+// CHECK: [[big_LINE]] = !DILocation(line: 32, scope: ![[#]])
// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
// CHECK: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
More information about the cfe-commits
mailing list