CarlosAlbertoEnciso wrote:
@dwblaikie:
> Not sure why it'd be necessary to make that vtable global variable "global"
> rather than static within the class? Is that for debug_names lookup? (I think
> static members are still in the index, right?) If it's a class member you can
> still do bidir
CarlosAlbertoEnciso wrote:
> Though I haven't thought seriously about the representation - truly off the
> cuff, take with a grain of salt, etc, the static member that is the vtable
> seems sort of reasonable to me.
>
> Not sure why it'd be necessary to make that vtable global variable "global
CarlosAlbertoEnciso wrote:
@clayborg Thanks very much for the extra information.
> FYI: There is already VTable support in our lldb::SBValue class and it is
> part of the public API in LLDB and doesn't require any of this:
>
> ```
> $ cat main.cpp
>1 #include
>2
>
CarlosAlbertoEnciso wrote:
> > Given the _vtable$ artificial member: use the DW_AT_containing_type to find
> > the vtable global variable.
>
> It seems to me that this attribute should refer to a type and not a variable.
Good point. Another option is to use `DW_AT_specification`.
```
0x00
CarlosAlbertoEnciso wrote:
@Michael137, @dwblaikie, @labath, @tromey Thanks very much for your valuable
feedback.
Is there any additional points about the current patch that you would like to
address?
Thanks
https://github.com/llvm/llvm-project/pull/130255
CarlosAlbertoEnciso wrote:
As pointed out by @Michael137
> If we're given the `_vtable$` artificial member, there's nothing useful we
> can do with it right?
```
0x0042: DW_TAG_variable
DW_AT_specification (0x005c "_vtable$")
DW_AT_alignment (8)
CarlosAlbertoEnciso wrote:
> > > To work out which class A this refers to would involve parsing the
> > > template parameter correctly and matching to the correct anonymous
> > > namespace. While this technically isn’t impossible
> >
> >
> > Are you sure about that? Anonymous types are confin
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl
*RD) {
return internString("_vptr$", RD->getNameAsString());
}
+// Emit symbol for the debugger that points to the vtable address for
+// the given class. The symbol is named as '_vtable$'.
+//
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/130255
>From 4bd0c48e12114301d8b81e9abe59e538684a6f71 Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Tue, 25 Feb 2025 09:23:24 +
Subject: [PATCH 1/2] [DebugInfo] Add symbol for debugger with
CarlosAlbertoEnciso wrote:
> > To work out which class A this refers to would involve parsing the template
> > parameter correctly and matching to the correct anonymous namespace. While
> > this technically isn’t impossible
>
> Are you sure about that? Anonymous types are confined to a single
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl
*RD) {
return internString("_vptr$", RD->getNameAsString());
}
+// Emit symbol for the debugger that points to the vtable address for
+// the given class. The symbol is named as '_vtable$'.
+//
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl
*RD) {
return internString("_vptr$", RD->getNameAsString());
}
+// Emit symbol for the debugger that points to the vtable address for
+// the given class. The symbol is named as '_vtable$'.
+//
CarlosAlbertoEnciso wrote:
> The DWARF currently provides access to the vtable location for /instances/ of
> the class, so curious what the distinction/need is for doing this from the
> class, without instances?
>
The need to be done for the class is to give the debugger extra information
ab
CarlosAlbertoEnciso wrote:
> The DWARF currently provides access to the vtable location for /instances/ of
> the class, so curious what the distinction/need is for doing this from the
> class, without instances?
>
> > Previously, this had to be done by searching for ELF symbols with matching
CarlosAlbertoEnciso wrote:
> What sort of features are you picturing building with this?
>
Automatic type promotion: when displaying an object through a base pointer the
debugger wants to still be able to show the object’s state.
https://github.com/llvm/llvm-project/pull/130255
___
CarlosAlbertoEnciso wrote:
@Michael137, @dwblaikie Thanks for your feedback.
https://github.com/llvm/llvm-project/pull/130255
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl
*RD) {
return internString("_vptr$", RD->getNameAsString());
}
+// Emit symbol for the debugger that points to the vtable address for
+// the given class. The symbol is named as '_vtable$'.
+//
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl
*RD) {
return internString("_vptr$", RD->getNameAsString());
}
+// Emit symbol for the debugger that points to the vtable address for
+// the given class. The symbol is named as '_vtable$'.
+//
https://github.com/CarlosAlbertoEnciso created
https://github.com/llvm/llvm-project/pull/130255
The IR now includes a global variable for the debugger that holds
the address of the vtable.
Now every class that contains virtual functions, has a static
member (marked as artificial) that identifie
@@ -5766,28 +5766,16 @@ void CGDebugInfo::EmitPseudoVariable(CGBuilderTy
&Builder,
// it is loaded upon use, so we identify such pattern here.
if (llvm::LoadInst *Load = dyn_cast(Value)) {
llvm::Value *Var = Load->getPointerOperand();
-if (llvm::Metadata *MDValue =
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/69920
>From 844ec47fb887a860b4f8e28d435848a245eeb388 Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Mon, 23 Oct 2023 11:44:22 +0100
Subject: [PATCH 1/5] [indvars] Missing variables at Og:
https
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/77901
>From cea029185ad219a4a0b6d03be00b0612675933ab Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Fri, 12 Jan 2024 09:27:53 +
Subject: [PATCH] [IPSCCP] Variable not visible at Og:
https:/
https://github.com/CarlosAlbertoEnciso edited
https://github.com/llvm/llvm-project/pull/69920
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1482,6 +1513,21 @@ int llvm::rewriteLoopExitValues(Loop *L, LoopInfo *LI,
TargetLibraryInfo *TLI,
(isa(Inst) || isa(Inst)) ?
&*Inst->getParent()->getFirstInsertionPt() : Inst;
RewritePhiSet.emplace_back(PN, i, ExitValue, InsertPt, HighCost);
+
+
https://github.com/CarlosAlbertoEnciso closed
https://github.com/llvm/llvm-project/pull/69681
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
CarlosAlbertoEnciso wrote:
@adrian-prantl, @OCHyams Thanks for your reviews.
https://github.com/llvm/llvm-project/pull/69681
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
CarlosAlbertoEnciso wrote:
Uploaded new patch to address minor details with the test case:
- Added check for missing captured `a` variable.
- Check for the specific values in `DW_OP_plus_uconst`.
https://github.com/llvm/llvm-project/pull/69681
___
cfe-
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/69681
>From 42df544996bb8fee93e5d1bab72e71578645bcc4 Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Fri, 20 Oct 2023 06:09:04 +0100
Subject: [PATCH 1/3] [Clang][DebugInfo] Clang generates an ext
CarlosAlbertoEnciso wrote:
Uploaded new patch to address comments from @OCHyams
https://github.com/llvm/llvm-project/pull/69681
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2,10 +2,8 @@
CarlosAlbertoEnciso wrote:
Added the `--implicit-check-not` option.
https://github.com/llvm/llvm-project/pull/69681
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck
%s
+
+struct Tuple {
+ int Fld_1;
+ int Fld_2;
+};
+__attribute__((optnone)) Tuple get() { return {10, 20}; }
+
+// CHECK-LABEL: define dso_local noundef i32 @main
+// CHECK: %r
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/69681
>From eef5d041e6b2fe02bba86113a41035324c6c81b8 Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Fri, 20 Oct 2023 06:09:04 +0100
Subject: [PATCH 1/2] [Clang][DebugInfo] Clang generates an ext
https://github.com/CarlosAlbertoEnciso created
https://github.com/llvm/llvm-project/pull/69681
Do not emit call to llvm.dbg.declare when the variable declaration
is a DecompositionDecl as its instance class is always unnamed.
The emitted debug declare looks like:
```
call void @llvm.dbg.declare
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/66745
>From b24943f63025822a5c5ba90c4a7b47f7123ec4db Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Mon, 18 Sep 2023 12:29:17 +0100
Subject: [PATCH 1/4] [IPSCCP] Variable not visible at Og:
htt
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/66745
>From b24943f63025822a5c5ba90c4a7b47f7123ec4db Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Mon, 18 Sep 2023 12:29:17 +0100
Subject: [PATCH 1/4] [IPSCCP] Variable not visible at Og:
htt
https://github.com/CarlosAlbertoEnciso edited
https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
CarlosAlbertoEnciso wrote:
@jryans, @felipepiovezan, @nikic, @dwblaikie:
Thanks for all your feedback. I have uploaded a new patch that addresses all
your points.
I am sorry if there are extra commits on this branch. This is the first update
since moving to GitHub.
https://github.com/llvm/llvm
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/66745
>From b24943f63025822a5c5ba90c4a7b47f7123ec4db Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Mon, 18 Sep 2023 12:29:17 +0100
Subject: [PATCH 1/4] [IPSCCP] Variable not visible at Og:
htt
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
+SmallVector GVEs;
+GV->getDebugInfo(GVEs);
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
CarlosAlbertoEnciso wrote:
Moving
@@ -371,6 +372,52 @@ static bool runIPSCCP(
StoreInst *SI = cast(GV->user_back());
SI->eraseFromParent();
}
+
+// Try to create a debug constant expression for the glbal variable
+// initializer value.
CarlosAlbertoEnciso wrote:
Moving
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/66745
>From b24943f63025822a5c5ba90c4a7b47f7123ec4db Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Mon, 18 Sep 2023 12:29:17 +0100
Subject: [PATCH] [IPSCCP] Variable not visible at Og:
https:/
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/66745
>From b24943f63025822a5c5ba90c4a7b47f7123ec4db Mon Sep 17 00:00:00 2001
From: Carlos Alberto Enciso
Date: Mon, 18 Sep 2023 12:29:17 +0100
Subject: [PATCH] [IPSCCP] Variable not visible at Og:
https:/
Author: Carlos Alberto Enciso
Date: 2023-04-21T09:11:40+01:00
New Revision: 0ba922f600469df273c753f873668e41025487c0
URL:
https://github.com/llvm/llvm-project/commit/0ba922f600469df273c753f873668e41025487c0
DIFF:
https://github.com/llvm/llvm-project/commit/0ba922f600469df273c753f873668e41025487
Author: Carlos Alberto Enciso
Date: 2022-08-23T05:45:25+01:00
New Revision: 6c6c4f6a9b3ef2d7db937cb78784245ea8a61418
URL:
https://github.com/llvm/llvm-project/commit/6c6c4f6a9b3ef2d7db937cb78784245ea8a61418
DIFF:
https://github.com/llvm/llvm-project/commit/6c6c4f6a9b3ef2d7db937cb78784245ea8a614
Author: Carlos Alberto Enciso
Date: 2022-08-17T08:16:10+01:00
New Revision: 177cbb1c9b661b15a7db35e4ec9255adf502a6cb
URL:
https://github.com/llvm/llvm-project/commit/177cbb1c9b661b15a7db35e4ec9255adf502a6cb
DIFF:
https://github.com/llvm/llvm-project/commit/177cbb1c9b661b15a7db35e4ec9255adf502a6
55 matches
Mail list logo