llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo

@llvm/pr-subscribers-clang-codegen

Author: J. Ryan Stinnett (jryans)

<details>
<summary>Changes</summary>

This wraps compiler built-ins in an artificial inlined subprogram for debug 
info purposes. This makes compiler built-in usage legible to debug info 
consumers like profilers, which can then annotate time spent with the built-in 
function name. For example, calls to e.g. `__builtin_alloca` and 
`__builtin_memset` become visible to profilers and debuggers, improving the 
correspondence to the source program.

---
Full diff: https://github.com/llvm/llvm-project/pull/189969.diff


7 Files Affected:

- (modified) clang/lib/CodeGen/CGBuiltin.cpp (+5) 
- (modified) clang/lib/CodeGen/CGDebugInfo.cpp (+21) 
- (modified) clang/lib/CodeGen/CGDebugInfo.h (+17) 
- (modified) clang/test/DebugInfo/CXX/verbose-trap.cpp (+22-17) 
- (added) clang/test/DebugInfo/Generic/builtin.c (+26) 
- (modified) clang/test/DebugInfo/Generic/extern-call.c (+3-1) 
- (modified) clang/test/DebugInfo/KeyInstructions/builtin.c (+65-37) 


``````````diff
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 4d74d681cd320..3bb1977094cf9 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -2648,6 +2648,11 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl 
GD, unsigned BuiltinID,
   assert(!getContext().BuiltinInfo.isImmediate(BuiltinID) &&
          "Should not codegen for consteval builtins");
 
+  // Treat built-in as call to artificial inlined function in debug info.
+  // This enables e.g. profiling tools to annotate time spent in user-called
+  // built-ins with the built-in function name.
+  ApplyBuiltinDebugLocation DebugScope(*this, GD);
+
   const FunctionDecl *FD = GD.getDecl()->getAsFunction();
   // See if we can constant fold this builtin.  If so, don't emit it at all.
   // TODO: Extend this handling to all builtin calls that we can constant-fold.
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp 
b/clang/lib/CodeGen/CGDebugInfo.cpp
index dbd400343d9e1..581ef3368c8ec 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -347,6 +347,19 @@ ApplyInlineDebugLocation::~ApplyInlineDebugLocation() {
   DI.EmitLocation(CGF->Builder, SavedLocation);
 }
 
+static llvm::DILocation *createBuiltinInlineAt(CodeGenFunction &CGF,
+                                               GlobalDecl GD) {
+  if (!CGF.getDebugInfo()) {
+    return nullptr;
+  }
+  auto &DI = *CGF.getDebugInfo();
+  return DI.createBuiltinFunctionLocation(CGF.Builder, GD);
+}
+
+ApplyBuiltinDebugLocation::ApplyBuiltinDebugLocation(CodeGenFunction &CGF,
+                                                     GlobalDecl BuiltinFn)
+    : CGF(&CGF), Apply(CGF, createBuiltinInlineAt(CGF, BuiltinFn)) {}
+
 void CGDebugInfo::setLocation(SourceLocation Loc) {
   // If the new location isn't valid return.
   if (Loc.isInvalid())
@@ -5122,6 +5135,14 @@ void CGDebugInfo::EmitInlineFunctionEnd(CGBuilderTy 
&Builder) {
   setInlinedAt(llvm::DebugLoc(CurInlinedAt).getInlinedAt());
 }
 
+llvm::DILocation *
+CGDebugInfo::createBuiltinFunctionLocation(CGBuilderTy &Builder,
+                                           GlobalDecl GD) {
+  const auto *FD = cast<FunctionDecl>(GD.getDecl());
+  return CreateSyntheticInlineAt(Builder.getCurrentDebugLocation(),
+                                 getFunctionName(FD));
+}
+
 void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc) {
   // Update our current location
   setLocation(Loc);
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index 8e1eda2d93ac0..3a31ee315b6b5 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -503,6 +503,10 @@ class CGDebugInfo {
   /// End an inlined function scope.
   void EmitInlineFunctionEnd(CGBuilderTy &Builder);
 
+  /// Create location for an inlined built-in function.
+  llvm::DILocation *createBuiltinFunctionLocation(CGBuilderTy &Builder,
+                                                  GlobalDecl GD);
+
   /// Emit debug info for a function declaration.
   /// \p Fn is set only when a declaration for a debug call site gets created.
   void EmitFunctionDecl(GlobalDecl GD, SourceLocation Loc,
@@ -995,6 +999,19 @@ class ApplyInlineDebugLocation {
   ApplyInlineDebugLocation &operator=(ApplyInlineDebugLocation &) = delete;
 };
 
+/// A scoped helper to set the current debug location to a inlined location for
+/// a built-in function. The function is marked as artificial in debug info to
+/// convey the built-in aspect.
+class ApplyBuiltinDebugLocation {
+  CodeGenFunction *CGF;
+  ApplyDebugLocation Apply;
+
+public:
+  ApplyBuiltinDebugLocation(CodeGenFunction &CGF, GlobalDecl BuiltinFn);
+  ApplyBuiltinDebugLocation(const ApplyBuiltinDebugLocation &) = delete;
+  ApplyBuiltinDebugLocation &operator=(ApplyBuiltinDebugLocation &) = delete;
+};
+
 class SanitizerDebugLocation {
   CodeGenFunction *CGF;
   ApplyDebugLocation Apply;
diff --git a/clang/test/DebugInfo/CXX/verbose-trap.cpp 
b/clang/test/DebugInfo/CXX/verbose-trap.cpp
index 4a88df934ff7c..d76251c3275ad 100644
--- a/clang/test/DebugInfo/CXX/verbose-trap.cpp
+++ b/clang/test/DebugInfo/CXX/verbose-trap.cpp
@@ -1,19 +1,19 @@
 // RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm 
-debug-info-kind=limited %s -o - | FileCheck %s
 
 // CHECK-LABEL: define void @_Z2f0v()
-// CHECK: call void @llvm.trap(), !dbg ![[LOC17:.*]]
+// CHECK: call void @llvm.trap(), !dbg ![[LOCF0A:.*]]
 
 // CHECK: declare void @llvm.trap() #[[ATTR1:.*]]
 
 // CHECK-LABEL: define void @_Z2f1v()
-// CHECK: call void @llvm.trap(), !dbg ![[LOC23:.*]]
-// CHECK: call void @llvm.trap(), !dbg ![[LOC25:.*]]
+// CHECK: call void @llvm.trap(), !dbg ![[LOCF1A:.*]]
+// CHECK: call void @llvm.trap(), !dbg ![[LOCF1D:.*]]
 
 // CHECK-LABEL: define void @_Z2f3v()
 // CHECK: call void @_Z2f2IXadsoKcL_ZL8constCatEEEXadsoS0_L_ZL8constMsgEEEEvv()
 
 // CHECK-LABEL: define internal void 
@_Z2f2IXadsoKcL_ZL8constCatEEEXadsoS0_L_ZL8constMsgEEEEvv
-// CHECK: call void @llvm.trap(), !dbg ![[LOC36:.*]]
+// CHECK: call void @llvm.trap(), !dbg ![[LOCF2A:.*]]
 
 // CHECK: attributes #[[ATTR1]] = { cold {{.*}}}
 
@@ -22,28 +22,33 @@
 char const constCat[] = "category2";
 char const constMsg[] = "hello";
 
-// CHECK: ![[SUBPROG14:.*]] = distinct !DISubprogram(name: "f0", linkageName: 
"_Z2f0v",
-// CHECK: ![[LOC17]] = !DILocation(line: 0, scope: ![[SUBPROG18:.*]], 
inlinedAt: ![[LOC20:.*]])
-// CHECK: ![[SUBPROG18]] = distinct !DISubprogram(name: 
"__clang_trap_msg$category1$Argument_must_not_be_null", scope: ![[FILESCOPE]], 
file: ![[FILESCOPE]], type: !{{.*}}, flags: DIFlagArtificial, spFlags: 
DISPFlagDefinition, unit: !{{.*}})
-// CHECK: ![[LOC20]] = !DILocation(line: [[@LINE+2]], column: 3, scope: 
![[SUBPROG14]])
+// CHECK: ![[SUBPROGF0A:.*]] = distinct !DISubprogram(name: "f0", linkageName: 
"_Z2f0v",
+// CHECK: ![[LOCF0A]] = !DILocation(line: 0, scope: ![[SUBPROGF0B:.*]], 
inlinedAt: ![[LOCF0B:.*]])
+// CHECK: ![[SUBPROGF0B]] = distinct !DISubprogram(name: 
"__clang_trap_msg$category1$Argument_must_not_be_null", scope: ![[FILESCOPE]], 
file: ![[FILESCOPE]], type: !{{.*}}, flags: DIFlagArtificial, spFlags: 
DISPFlagDefinition, unit: !{{.*}})
+// CHECK: ![[LOCF0B]] = !DILocation(line: 0, scope: ![[SUBPROGF0C:.*]], 
inlinedAt: ![[LOCF0C:.*]])
+// CHECK: ![[SUBPROGF0C]] = distinct !DISubprogram(name: 
"__builtin_verbose_trap"{{.*}}, flags: DIFlagArtificial
+// CHECK: ![[LOCF0C]] = !DILocation(line: [[@LINE+2]], column: 3, scope: 
![[SUBPROGF0A]])
 void f0() {
   __builtin_verbose_trap("category1", "Argument_must_not_be_null");
 }
 
-// CHECK: ![[SUBPROG22:.*]] = distinct !DISubprogram(name: "f1", linkageName: 
"_Z2f1v",
-// CHECK: ![[LOC23]] = !DILocation(line: 0, scope: ![[SUBPROG18]], inlinedAt: 
![[LOC24:.*]])
-// CHECK: ![[LOC24]] = !DILocation(line: [[@LINE+5]], column: 3, scope: 
![[SUBPROG22]])
-// CHECK: ![[LOC25]] = !DILocation(line: 0, scope: ![[SUBPROG26:.*]], 
inlinedAt: ![[LOC27:.*]])
-// CHECK: ![[SUBPROG26]] = distinct !DISubprogram(name: 
"__clang_trap_msg$category2$hello", scope: ![[FILESCOPE]], file: 
![[FILESCOPE]], type: !{{.*}}, flags: DIFlagArtificial, spFlags: 
DISPFlagDefinition, unit: !{{.*}})
-// CHECK: ![[LOC27]] = !DILocation(line: [[@LINE+3]], column: 3, scope: 
![[SUBPROG22]])
+// CHECK: ![[SUBPROGF1A:.*]] = distinct !DISubprogram(name: "f1", linkageName: 
"_Z2f1v",
+// CHECK: ![[LOCF1A]] = !DILocation(line: 0, scope: ![[SUBPROGF0B]], 
inlinedAt: ![[LOCF1B:.*]])
+// CHECK: ![[LOCF1B]] = !DILocation(line: 0, scope: ![[SUBPROGF0C]], 
inlinedAt: ![[LOCF1C:.*]])
+// CHECK: ![[LOCF1C]] = !DILocation(line: [[@LINE+6]], column: 3, scope: 
![[SUBPROGF1A]])
+// CHECK: ![[LOCF1D]] = !DILocation(line: 0, scope: ![[SUBPROGF1B:.*]], 
inlinedAt: ![[LOCF1E:.*]])
+// CHECK: ![[SUBPROGF1B]] = distinct !DISubprogram(name: 
"__clang_trap_msg$category2$hello", scope: ![[FILESCOPE]], file: 
![[FILESCOPE]], type: !{{.*}}, flags: DIFlagArtificial, spFlags: 
DISPFlagDefinition, unit: !{{.*}})
+// CHECK: ![[LOCF1E]] = !DILocation(line: 0, scope: ![[SUBPROGF0C]], 
inlinedAt: ![[LOCF1F:.*]])
+// CHECK: ![[LOCF1F]] = !DILocation(line: [[@LINE+3]], column: 3, scope: 
![[SUBPROGF1A]])
 void f1() {
   __builtin_verbose_trap("category1", "Argument_must_not_be_null");
   __builtin_verbose_trap("category2", "hello");
 }
 
-// CHECK: ![[SUBPROG32:.*]] = distinct !DISubprogram(name: "f2<constCat, 
constMsg>", linkageName: 
"_Z2f2IXadsoKcL_ZL8constCatEEEXadsoS0_L_ZL8constMsgEEEEvv",
-// CHECK: ![[LOC36]] = !DILocation(line: 0, scope: ![[SUBPROG26]], inlinedAt: 
![[LOC37:.*]])
-// CHECK: ![[LOC37]] = !DILocation(line: [[@LINE+3]], column: 3, scope: 
![[SUBPROG32]])
+// CHECK: ![[SUBPROGF2A:.*]] = distinct !DISubprogram(name: "f2<constCat, 
constMsg>", linkageName: 
"_Z2f2IXadsoKcL_ZL8constCatEEEXadsoS0_L_ZL8constMsgEEEEvv",
+// CHECK: ![[LOCF2A]] = !DILocation(line: 0, scope: ![[SUBPROGF1B]], 
inlinedAt: ![[LOCF2B:.*]])
+// CHECK: ![[LOCF2B]] = !DILocation(line: 0, scope: ![[SUBPROGF0C]], 
inlinedAt: ![[LOCF2C:.*]])
+// CHECK: ![[LOCF2C]] = !DILocation(line: [[@LINE+3]], column: 3, scope: 
![[SUBPROGF2A]])
 template <const char * const category, const char * const reason>
 void f2() {
   __builtin_verbose_trap(category, reason);
diff --git a/clang/test/DebugInfo/Generic/builtin.c 
b/clang/test/DebugInfo/Generic/builtin.c
new file mode 100644
index 0000000000000..396b8024e8566
--- /dev/null
+++ b/clang/test/DebugInfo/Generic/builtin.c
@@ -0,0 +1,26 @@
+
+// RUN: %clang_cc1 -triple x86_64-linux-gnu %s -debug-info-kind=limited 
-emit-llvm -disable-llvm-passes -o - | FileCheck %s
+
+void fun() {
+    // CHECK: %0 = alloca i8, i64 4{{.*}}, !dbg [[B1:!.*]]
+    void *a = __builtin_alloca(4);
+
+    // CHECK: %1 = alloca i8, i64 4{{.*}}, !dbg [[B2:!.*]]
+    // Ensure calling same built-in twice only produces one `DISubprogram` 
entry
+    void *b = __builtin_alloca(4);
+
+    // CHECK: call void @llvm.memset{{.*}}, !dbg [[B3:!.*]]
+    __builtin_memset(a, 0, 4);
+}
+
+// CHECK: [[B1]] = !DILocation(line: 0, scope: [[S1:!.*]], inlinedAt: 
[[I1:!.*]])
+// CHECK: [[S1]] = distinct !DISubprogram(name: "__builtin_alloca"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I1]] = !DILocation(line: 6,
+
+// Second call should reuse same `DISubprogram` scope
+// CHECK: [[B2]] = !DILocation(line: 0, scope: [[S1:!.*]], inlinedAt: 
[[I2:!.*]])
+// CHECK: [[I2]] = !DILocation(line: 10,
+
+// CHECK: [[B3]] = !DILocation(line: 0, scope: [[S3:!.*]], inlinedAt: 
[[I3:!.*]])
+// CHECK: [[S3]] = distinct !DISubprogram(name: "__builtin_memset"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I3]] = !DILocation(line: 13,
diff --git a/clang/test/DebugInfo/Generic/extern-call.c 
b/clang/test/DebugInfo/Generic/extern-call.c
index 0d18dc436040f..73f2742693521 100644
--- a/clang/test/DebugInfo/Generic/extern-call.c
+++ b/clang/test/DebugInfo/Generic/extern-call.c
@@ -33,7 +33,9 @@
 // DECLS-FOR-EXTERN: !DISubprogram(name: "__some_reserved_name"
 
 // NO-DECLS-FOR-EXTERN-NOT: !DISubprogram(name: "fn1"
-// NO-DECLS-FOR-EXTERN-NOT: !DISubprogram(name: "memcmp"
+// `memcmp` case still results in (artificial) subprogram as part of artificial
+// inlined subprograms for compiler built-ins
+// NO-DECLS-FOR-EXTERN: !DISubprogram(name: "memcmp"{{.*}}, flags: 
DIFlagArtificial
 // NO-DECLS-FOR-EXTERN-NOT: !DISubprogram(name: "__some_reserved_name"
 
 typedef int x;
diff --git a/clang/test/DebugInfo/KeyInstructions/builtin.c 
b/clang/test/DebugInfo/KeyInstructions/builtin.c
index ce8c6124fe923..c7f63ff8420df 100644
--- a/clang/test/DebugInfo/KeyInstructions/builtin.c
+++ b/clang/test/DebugInfo/KeyInstructions/builtin.c
@@ -13,78 +13,106 @@ int v = 3;
 
 void fun() {
 // CHECK: %a = alloca ptr, align 8
-// CHECK: %0 = alloca i8, i64 4{{.*}}, !dbg [[G1R2:!.*]]
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G1R1:!.*]], !annotation
+// CHECK: %0 = alloca i8, i64 4{{.*}}, !dbg [[B1:!.*]]
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[B1:!.*]], !annotation
 // CHECK: store ptr %0, ptr %a{{.*}}, !dbg [[G1R1:!.*]]
     void *a = __builtin_alloca(4);
 
-// CHECK: %1 = alloca i8, i64 4{{.*}}, !dbg [[G2R2:!.*]]
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G2R1:!.*]], !annotation
+// CHECK: %1 = alloca i8, i64 4{{.*}}, !dbg [[B2:!.*]]
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[B2:!.*]], !annotation
 // CHECK: store ptr %1, ptr %b{{.*}}, !dbg [[G2R1:!.*]]
     void *b = __builtin_alloca_with_align(4, 8);
 
 // CHECK: %2 = load <4 x float>, ptr @mat{{.*}}, !dbg [[G3R2:!.*]]
-// CHECK: call void @llvm.matrix.column.major.store.v4f32{{.*}}, !dbg 
[[G3R1:!.*]]
+// CHECK: call void @llvm.matrix.column.major.store.v4f32{{.*}}, !dbg 
[[B3:!.*]]
     __builtin_matrix_column_major_store(mat, f4, sizeof(float) * 2);
 
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G4R1:!.*]]
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[B4:!.*]]
     __builtin_bzero(f4, sizeof(float) * 2);
 
-// CHECK: call void @llvm.memmove{{.*}}, !dbg [[G5R1:!.*]]
+// CHECK: call void @llvm.memmove{{.*}}, !dbg [[B5:!.*]]
     __builtin_bcopy(f4, f8, sizeof(float) * 4);
 
-// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G6R1:!.*]]
+// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[B6:!.*]]
     __builtin_memcpy(f4, f8, sizeof(float) * 4);
 
-// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G7R1:!.*]]
+// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[B7:!.*]]
     __builtin_mempcpy(f4, f8, sizeof(float) * 4);
 
-// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G8R1:!.*]]
+// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[B8:!.*]]
     __builtin_memcpy_inline(f4, f8, sizeof(float) * 4);
 
-// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G9R1:!.*]]
+// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[B9:!.*]]
     __builtin___memcpy_chk(f4, f8, sizeof(float) * 4, -1);
 
-// CHECK: call void @llvm.memmove{{.*}}, !dbg [[G10R1:!.*]]
+// CHECK: call void @llvm.memmove{{.*}}, !dbg [[B10:!.*]]
     __builtin___memmove_chk(f4, f8, sizeof(float) * 4, -1);
 
-// CHECK: call void @llvm.memmove{{.*}}, !dbg [[G11R1:!.*]]
+// CHECK: call void @llvm.memmove{{.*}}, !dbg [[B11:!.*]]
     __builtin_memmove(f4, f8, sizeof(float) * 4);
 
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G12R1:!.*]]
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[B12:!.*]]
     __builtin_memset(f4, 0, sizeof(float) * 4);
 
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G13R1:!.*]]
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[B13:!.*]]
     __builtin_memset_inline(f4, 0, sizeof(float) * 4);
 
-// CHECK: call void @llvm.memset{{.*}}, !dbg [[G14R1:!.*]]
+// CHECK: call void @llvm.memset{{.*}}, !dbg [[B14:!.*]]
     __builtin___memset_chk(f4, 0, sizeof(float), -1);
 
-// CHECK: %3 = load i32, ptr @v{{.*}}, !dbg [[G15R3:!.*]]
-// CHECK-NEXT: %4 = trunc i32 %3 to i8, !dbg [[G15R2:!.*]]
-// CHECK-NEXT: call void @llvm.memset{{.*}}, !dbg [[G15R1:!.*]]
+// CHECK: %3 = load i32, ptr @v{{.*}}, !dbg [[G4R3:!.*]]
+// CHECK-NEXT: %4 = trunc i32 %3 to i8, !dbg [[B15:!.*]]
+// CHECK-NEXT: call void @llvm.memset{{.*}}, !dbg [[B15:!.*]]
     __builtin_memset(f4, v, sizeof(float) * 4);
-// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
+// CHECK: ret{{.*}}, !dbg [[G5R1:!.*]]
 }
 
-// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
+// CHECK: [[B1]] = !DILocation(line: 0, scope: [[S1:!.*]], inlinedAt: 
[[I1:!.*]])
+// CHECK: [[S1]] = distinct !DISubprogram(name: "__builtin_alloca"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I1]] = !DILocation(line: 19,
 // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
-// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
+// CHECK: [[B2]] = !DILocation(line: 0, scope: [[S2:!.*]], inlinedAt: 
[[I2:!.*]])
+// CHECK: [[S2]] = distinct !DISubprogram(name: 
"__builtin_alloca_with_align"{{.*}}, flags: DIFlagArtificial
+// CHECK: [[I2]] = !DILocation(line: 24,
 // CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
 // CHECK: [[G3R2]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 2)
-// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
-// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
+// CHECK: [[B3]] = !DILocation(line: 0, scope: [[S3:!.*]], inlinedAt: 
[[I3:!.*]])
+// CHECK: [[S3]] = distinct !DISubprogram(name: 
"__builtin_matrix_column_major_store"{{.*}}, flags: DIFlagArtificial
+// CHECK: [[I3]] = !DILocation(line: 28,
+// CHECK: [[B4]] = !DILocation(line: 0, scope: [[S4:!.*]], inlinedAt: 
[[I4:!.*]])
+// CHECK: [[S4]] = distinct !DISubprogram(name: "__builtin_bzero"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I4]] = !DILocation(line: 31,
+// CHECK: [[B5]] = !DILocation(line: 0, scope: [[S5:!.*]], inlinedAt: 
[[I5:!.*]])
+// CHECK: [[S5]] = distinct !DISubprogram(name: "__builtin_bcopy"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I5]] = !DILocation(line: 34,
+// CHECK: [[B6]] = !DILocation(line: 0, scope: [[S6:!.*]], inlinedAt: 
[[I6:!.*]])
+// CHECK: [[S6]] = distinct !DISubprogram(name: "__builtin_memcpy"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I6]] = !DILocation(line: 37,
+// CHECK: [[B7]] = !DILocation(line: 0, scope: [[S7:!.*]], inlinedAt: 
[[I7:!.*]])
+// CHECK: [[S7]] = distinct !DISubprogram(name: "__builtin_mempcpy"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I7]] = !DILocation(line: 40,
+// CHECK: [[B8]] = !DILocation(line: 0, scope: [[S8:!.*]], inlinedAt: 
[[I8:!.*]])
+// CHECK: [[S8]] = distinct !DISubprogram(name: 
"__builtin_memcpy_inline"{{.*}}, flags: DIFlagArtificial
+// CHECK: [[I8]] = !DILocation(line: 43,
+// CHECK: [[B9]] = !DILocation(line: 0, scope: [[S9:!.*]], inlinedAt: 
[[I9:!.*]])
+// CHECK: [[S9]] = distinct !DISubprogram(name: 
"__builtin___memcpy_chk"{{.*}}, flags: DIFlagArtificial
+// CHECK: [[I9]] = !DILocation(line: 46,
+// CHECK: [[B10]] = !DILocation(line: 0, scope: [[S10:!.*]], inlinedAt: 
[[I10:!.*]])
+// CHECK: [[S10]] = distinct !DISubprogram(name: 
"__builtin___memmove_chk"{{.*}}, flags: DIFlagArtificial
+// CHECK: [[I10]] = !DILocation(line: 49,
+// CHECK: [[B11]] = !DILocation(line: 0, scope: [[S11:!.*]], inlinedAt: 
[[I11:!.*]])
+// CHECK: [[S11]] = distinct !DISubprogram(name: "__builtin_memmove"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I11]] = !DILocation(line: 52,
+// CHECK: [[B12]] = !DILocation(line: 0, scope: [[S12:!.*]], inlinedAt: 
[[I12:!.*]])
+// CHECK: [[S12]] = distinct !DISubprogram(name: "__builtin_memset"{{.*}}, 
flags: DIFlagArtificial
+// CHECK: [[I12]] = !DILocation(line: 55,
+// CHECK: [[B13]] = !DILocation(line: 0, scope: [[S13:!.*]], inlinedAt: 
[[I13:!.*]])
+// CHECK: [[S13]] = distinct !DISubprogram(name: 
"__builtin_memset_inline"{{.*}}, flags: DIFlagArtificial
+// CHECK: [[I13]] = !DILocation(line: 58,
+// CHECK: [[B14]] = !DILocation(line: 0, scope: [[S14:!.*]], inlinedAt: 
[[I14:!.*]])
+// CHECK: [[S14]] = distinct !DISubprogram(name: 
"__builtin___memset_chk"{{.*}}, flags: DIFlagArtificial
+// CHECK: [[I14]] = !DILocation(line: 61,
+// CHECK: [[G4R3]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 3)
+// CHECK: [[B15]] = !DILocation(line: 0, scope: [[S12]], inlinedAt: 
[[I15:!.*]])
+// CHECK: [[I15]] = !DILocation(line: 66,
 // CHECK: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
-// CHECK: [[G6R1]] = !DILocation({{.*}}, atomGroup: 6, atomRank: 1)
-// CHECK: [[G7R1]] = !DILocation({{.*}}, atomGroup: 7, atomRank: 1)
-// CHECK: [[G8R1]] = !DILocation({{.*}}, atomGroup: 8, atomRank: 1)
-// CHECK: [[G9R1]] = !DILocation({{.*}}, atomGroup: 9, atomRank: 1)
-// CHECK: [[G10R1]] = !DILocation({{.*}}, atomGroup: 10, atomRank: 1)
-// CHECK: [[G11R1]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 1)
-// CHECK: [[G12R1]] = !DILocation({{.*}}, atomGroup: 12, atomRank: 1)
-// CHECK: [[G13R1]] = !DILocation({{.*}}, atomGroup: 13, atomRank: 1)
-// CHECK: [[G14R1]] = !DILocation({{.*}}, atomGroup: 14, atomRank: 1)
-// CHECK: [[G15R3]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 3)
-// CHECK: [[G15R2]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 2)
-// CHECK: [[G15R1]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 1)
-// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 16, atomRank: 1)

``````````

</details>


https://github.com/llvm/llvm-project/pull/189969
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to