@@ -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 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
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 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 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/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
@@ -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
@@ -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-
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
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 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-
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
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
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
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
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:/
@@ -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
@@ -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);
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
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 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
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
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
@@ -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 =
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:
> > 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:
@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:
> > 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
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
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:
@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
@@ -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:
@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
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:
> 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:
> 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
@@ -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$'.
+//
@@ -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
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
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
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/130255
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,
CarlosAlbertoEnciso wrote:
Uploaded a patch that eliminates the global variable and it moves the vtable
information into the static member;
in that way, a consumer always will have access to the vtable information, just
by having an object instance or the object definition.
The patch has been
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/4] [DebugInfo] Add symbol for debugger with
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/130255
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,
CarlosAlbertoEnciso wrote:
> Got measurements on debug info size growth or any other metrics we should be
> considering?
I will prepare some measurements on debug info size.
https://github.com/llvm/llvm-project/pull/130255
___
cfe-commits mailing li
https://github.com/CarlosAlbertoEnciso updated
https://github.com/llvm/llvm-project/pull/130255
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,
CarlosAlbertoEnciso wrote:
> Apologies if I missed it, but one thing I didn't see in the patch is a test
> for the case where a class is defined inside a function.
>
> Given the discussion
> [here](https://discourse.llvm.org/t/rfc-dwarfdebug-fix-and-improve-handling-imported-entities-types-and
@@ -1816,6 +1816,15 @@ class CodeGenModule : public CodeGenTypeCache {
void requireVectorDestructorDefinition(const CXXRecordDecl *RD);
bool classNeedsVectorDestructor(const CXXRecordDecl *RD);
+ // Helper to get the alignment for a variable.
+ unsigned getGlobalVarAlign
CarlosAlbertoEnciso wrote:
Updated patch.
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
CarlosAlbertoEnciso wrote:
> Could you remove the LLVM tests? They don't add coverage since tnhis isn't an
> LLVM feature - as far as LLVM is concerned, this is another static member
> variable like any other.
Removed all the LLVM tests.
>
> Why do some of the test cases use distinct input f
CarlosAlbertoEnciso wrote:
@tromey You added a note about a missing test for the case where a class is
defined inside a function.
That case is handled by
`clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple-main.cpp`
https://github.com/llvm/llvm-project/pull/130255
CarlosAlbertoEnciso wrote:
@dwblaikie I have used bloaty to get some debug info size changes.
The VTable work is based on this specific revision c02019141.
I built Clang using `DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang`:
- at that specific revision c02019141 (original Clang) --> *
67 matches
Mail list logo