https://github.com/OCHyams closed
https://github.com/llvm/llvm-project/pull/84756
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T10:01:51Z
New Revision: b097b3dc2ba2517621a5e3da3237a77ed0e7586f
URL:
https://github.com/llvm/llvm-project/commit/b097b3dc2ba2517621a5e3da3237a77ed0e7586f
DIFF:
https://github.com/llvm/llvm-project/commit/b097b3dc2ba2517621a5e3da3237a77ed0e7586f.di
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T10:13:12Z
New Revision: 3e4170a587adb789b77ede799d09139b50ebe5bc
URL:
https://github.com/llvm/llvm-project/commit/3e4170a587adb789b77ede799d09139b50ebe5bc
DIFF:
https://github.com/llvm/llvm-project/commit/3e4170a587adb789b77ede799d09139b50ebe5bc.di
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T10:13:35Z
New Revision: 92122b0b4b514ea6c081e428f47ef1bf9d4f0f17
URL:
https://github.com/llvm/llvm-project/commit/92122b0b4b514ea6c081e428f47ef1bf9d4f0f17
DIFF:
https://github.com/llvm/llvm-project/commit/92122b0b4b514ea6c081e428f47ef1bf9d4f0f17.di
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T10:55:29Z
New Revision: 3e6db602918435b6a5ac476f63f8b259e7e73af4
URL:
https://github.com/llvm/llvm-project/commit/3e6db602918435b6a5ac476f63f8b259e7e73af4
DIFF:
https://github.com/llvm/llvm-project/commit/3e6db602918435b6a5ac476f63f8b259e7e73af4.di
https://github.com/OCHyams created
https://github.com/llvm/llvm-project/pull/84756
This patch fixes problems that pop up when clang emits DbgRecords instead of
debug intrinsics.
Note: this doesn't mean clang is emitting DbgRecords yet, because the modules
it creates are still always in the ol
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/84756
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams updated
https://github.com/llvm/llvm-project/pull/84756
>From 8b37020a48b8145ad9d7deb288b9f8a3ee3a9a9b Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams
Date: Sat, 9 Mar 2024 13:10:05 +
Subject: [PATCH 1/3] clang: insertbefore non-debug for removeDIs stability
OCHyams wrote:
> Maybe wants someone with more frontend knowledge to chime in, but all SGTM.
@adrian-prantl are you able to suggest anyone that might be able to take a look
at this (part of this touches some Objective-C code+test) - we're not overly
familiar with front end code.
https://githu
https://github.com/OCHyams approved this pull request.
LGTM 👍
https://github.com/llvm/llvm-project/pull/75228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams edited
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/OCHyams commented:
This SGTM.
I don't think the unnamed variable serves any useful purpose but may not being
imaginative enough. I can't see any discussion on the topic when the code was
added in [D119178](https://reviews.llvm.org/D119178) . CC the author, @shafik
(or @adri
@@ -2,10 +2,8 @@
OCHyams wrote:
Please can you add `--implicit-check-not="call void @llvm.dbg.declare"` to the
`FileCheck` command?
https://github.com/llvm/llvm-project/pull/69681
___
cfe-commits mailing list
cfe-co
@@ -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/OCHyams approved this pull request.
New changes LGTM, thanks!
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
OCHyams wrote:
> LLVM IR parts look good to me.
Thanks!
@pogo59 said:
> Converting frame-types.s from v4 to v5 should be done as a separate commit.
> Then adding the alias would be a simpler change to review.
I've split that into two commits in this PR: upgrade to v5:
[18446f2](https://gith
@@ -1542,19 +1542,10 @@ class CallBase : public Instruction {
OperandBundleDef OB,
Instruction *InsertPt = nullptr);
- /// Create a clone of \p CB with operand bundle \p OB added.
- static CallBase *addO
https://github.com/OCHyams approved this pull request.
LGTM if this is clang-formatted (I can't tell). Plus one small inline nit - I
think it's fine either way.
https://github.com/llvm/llvm-project/pull/85981
___
cfe-commits mailing list
cfe-commits@l
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/85981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -542,7 +542,8 @@ void InsertPHIStrategy::mutate(BasicBlock &BB,
RandomIRBuilder &IB) {
if (&BB == &BB.getParent()->getEntryBlock())
return;
Type *Ty = IB.randomType();
- PHINode *PHI = PHINode::Create(Ty, llvm::pred_size(&BB), "", &BB.front());
+ PHINode *PHI =
+
@@ -310,6 +310,23 @@ namespace llvm {
DINode::DIFlags Flags = DINode::FlagZero,
DINodeArray Annotations = nullptr);
+/// Create debugging information entry for a typedef.
+/// \param Ty Original
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) {
return T.Reconstitutable;
}
-std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const {
+bool CGDebugInfo::HasReconstitutableArgs(
+ArrayRef Args) const {
+ return llvm::all_of(Args, [&
@@ -152,9 +152,11 @@ uint64_t DebugHandlerBase::getBaseTypeSize(const DIType
*Ty) {
unsigned Tag = DDTy->getTag();
if (Tag != dwarf::DW_TAG_member && Tag != dwarf::DW_TAG_typedef &&
- Tag != dwarf::DW_TAG_const_type && Tag != dwarf::DW_TAG_volatile_type &&
+ Tag
OCHyams wrote:
Fixed
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/94956
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
OCHyams wrote:
Thanks @dwblaikie
> Bit unfortunate to store template parameters in different ways (in the
> extraData for the alias template, but in the templateParams for the composite
> types) - but I guess it'd be more invasive to try to represent alias
> templates as composite types?
I
OCHyams wrote:
> But perhaps at least you could add named accessors to DIDerivedType for the
> template params, same as DIGlobalVariable/DICompositeType have?
Done. I couldn't add an assert (`getTag() == dwarf::DW_TAG_template_alias`)
without including `Dwarf.h`. I've chosen to not do that as
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) {
return T.Reconstitutable;
}
-std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const {
+bool CGDebugInfo::HasReconstitutableArgs(
+ArrayRef Args) const {
+ return llvm::all_of(Args, [&
@@ -4584,6 +4584,32 @@ renderDebugOptions(const ToolChain &TC, const Driver &D,
const llvm::Triple &T,
}
}
+ // Emit DW_TAG_template_alias for template aliases? True by default for SCE.
+ const auto *DebugTemplateAlias = Args.getLastArg(
+ options::OPT_gtemplate_
@@ -465,3 +465,15 @@
// MANGLED_TEMP_NAMES: error: unknown argument
'-gsimple-template-names=mangled'; did you mean '-Xclang
-gsimple-template-names=mangled'
// RUN: %clang -### -target x86_64 -c -g %s 2>&1 | FileCheck
--check-prefix=FULL_TEMP_NAMES
--implicit-check-not=debu
@@ -1,4 +1,4 @@
-// RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang -ggdb -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
OCHyams wrote:
Agreed, done
https://github.com/llvm/llvm-project/pull/87623
_
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
https://github.com/OCHyams commented:
(oops, didn't submit my inline replies...)
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -310,6 +310,24 @@ namespace llvm {
DINode::DIFlags Flags = DINode::FlagZero,
DINodeArray Annotations = nullptr);
+/// Create debugging information entry for a template alias.
+/// \param Ty O
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm
-debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \
+// RUN: | FileCheck %s
+
+ Check that -gtemplate-alias causes DW_TAG_template_alias emission for
+ template aliase
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if (CGM.getCodeGenO
OCHyams wrote:
I've rebased this so now this pull request contains only the Clang changes
(LLVM side is here #88943).
There's a discussion starting
[here](https://github.com/llvm/llvm-project/pull/87623#discussion_r1567968127)
that discusses whether or not we should include defaulted argument
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm
-debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \
+// RUN: | FileCheck %s
+
+ Check that -gtemplate-alias causes DW_TAG_template_alias emission for
+ template aliase
OCHyams wrote:
Thanks everyone. I'll land this now then to see what the bots have to say about
it.
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
https://github.com/OCHyams closed
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams created
https://github.com/llvm/llvm-project/pull/89594
DW_TAG_template_alias DIEs were added in DWARFv4, not DWARFv5
>From 95c86b499e1eebb15dbd61f839f5fefa83dc910d Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams
Date: Mon, 22 Apr 2024 11:48:19 +0100
Subject: [P
https://github.com/OCHyams closed
https://github.com/llvm/llvm-project/pull/89594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
OCHyams wrote:
Dependent expressions strike again - https://godbolt.org/z/W381837vr
```
template
using A = int;
template
struct S {
using AA = A;
AA aa;
};
S<0> s;
```
` clang++ -c test.cpp -g -gtemplate-alias`
`clang/lib/AST/ExprConstant.cpp:15721: bool
clang::Expr::EvaluateAsRValue(clan
https://github.com/OCHyams created
https://github.com/llvm/llvm-project/pull/90032
Workaround for issue #89774 until it can be properly fixed.
When `-gtemplate-alias` is specified Clang emits a DW_TAG_template_alias for
template aliases. This patch avoids an assertion failure by falling back t
https://github.com/OCHyams closed
https://github.com/llvm/llvm-project/pull/90032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Orlando Cazalet-Hyams
Date: 2024-04-30T09:16:14+01:00
New Revision: f78949a07e33017a798c410a102c95455685a9b1
URL:
https://github.com/llvm/llvm-project/commit/f78949a07e33017a798c410a102c95455685a9b1
DIFF:
https://github.com/llvm/llvm-project/commit/f78949a07e33017a798c410a102c95455685a9
OCHyams wrote:
> Comment in the code should probably mention this as a FIXME and include a
> reference to the issue?
Sure, added in f78949a07e33017a798c410a102c95455685a9b1
> Also, there's another bug here - the DW_TAG_typedef is in the CU scope,
> instead of the struct scope. But if the stru
OCHyams wrote:
@Michael137 said:
> Btw, as a follow-up to this patch should we check that this is compatible
> with dsymutil (i.e., running dsymutil --verify)? I suspect it might need a
> fixup (given LLDB doesn't even support this tag)
`dsymutil --verify` seems to be happy with the tag. Upo
OCHyams wrote:
Here's that issue - #91451.
Carlos pointed me to [bz44884](https://bugs.llvm.org/show_bug.cgi?id=44884)
(#44229) which may be related
https://github.com/llvm/llvm-project/pull/90032
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/OCHyams approved this pull request.
LGTM with nit + pls appease the the formatter
https://github.com/llvm/llvm-project/pull/102006
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/102006
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -295,18 +295,25 @@ void EHScopeStack::Cleanup::anchor() {}
static void createStoreInstBefore(llvm::Value *value, Address addr,
llvm::Instruction *beforeInst,
CodeGenFunction &CGF) {
- auto store = new llvm:
https://github.com/OCHyams commented:
> @OCHyams I believe you did the C API changes, are there any additional
> concerns in this area?
SGTM, just one inline question
https://github.com/llvm/llvm-project/pull/126059
___
cfe-commits mailing list
cfe-c
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/126059
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1686,7 +1686,8 @@ LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordBefore(
DbgInstPtr DbgInst = unwrap(Builder)->insertDeclare(
unwrap(Storage), unwrap(VarInfo),
unwrap(Expr), unwrap(DL),
- unwrap(Instr));
+ Instr ? InsertPosition(unwrap(Instr)->getI
@@ -242,13 +253,19 @@ class Instruction : public User,
/// \pre I is a valid iterator into BB.
void moveBefore(BasicBlock &BB, InstListType::iterator I);
- /// (See other overload for moveBeforePreserving).
void moveBeforePreserving(BasicBlock &BB, InstListType::iterat
@@ -224,11 +231,15 @@ class Instruction : public User,
/// the basic block that MovePos lives in, right before MovePos.
void moveBefore(Instruction *MovePos);
+ /// Unlink this instruction from its current basic block and insert it into
+ /// the basic block that MovePos
@@ -448,7 +448,7 @@ void IRPromoter::ExtendSources() {
if (isa(V))
I->moveBefore(InsertPt);
else
-I->moveAfter(InsertPt);
+I->moveAfter(&*InsertPt);
OCHyams wrote:
Same as earlier - is this a code-transition-state bug, or is
https://github.com/OCHyams approved this pull request.
LGTM with a couple nit/questions.
https://github.com/llvm/llvm-project/pull/123583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
@@ -8890,21 +8890,21 @@ bool
CodeGenPrepare::fixupDbgVariableRecord(DbgVariableRecord &DVR) {
return AnyChange;
}
-static void DbgInserterHelper(DbgValueInst *DVI, Instruction *VI) {
+static void DbgInserterHelper(DbgValueInst *DVI, BasicBlock::iterator VI) {
DVI->remove
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/123583
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -224,11 +231,15 @@ class Instruction : public User,
/// the basic block that MovePos lives in, right before MovePos.
void moveBefore(Instruction *MovePos);
+ /// Unlink this instruction from its current basic block and insert it into
+ /// the basic block that MovePos
@@ -224,11 +231,15 @@ class Instruction : public User,
/// the basic block that MovePos lives in, right before MovePos.
void moveBefore(Instruction *MovePos);
+ /// Unlink this instruction from its current basic block and insert it into
+ /// the basic block that MovePos
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/124288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -823,7 +823,16 @@ static void updateScopeLine(Instruction *ActiveSuspend,
if (!ActiveSuspend)
return;
- auto *Successor = ActiveSuspend->getNextNonDebugInstruction();
+ // No subsequent instruction -> fallback to the location of ActiveSuspend.
+ if (!ActiveSuspend-
https://github.com/OCHyams approved this pull request.
> parent-pointers can now be accessed from ilist nodes
Feels a bit of a shame we're not using this right away, but LGTM + nits
https://github.com/llvm/llvm-project/pull/124288
___
cfe-commits mail
https://github.com/OCHyams approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/124291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1686,7 +1686,8 @@ LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordBefore(
DbgInstPtr DbgInst = unwrap(Builder)->insertDeclare(
unwrap(Storage), unwrap(VarInfo),
unwrap(Expr), unwrap(DL),
- unwrap(Instr));
+ Instr ? InsertPosition(unwrap(Instr)->getI
https://github.com/OCHyams approved this pull request.
LGTM, thanks
https://github.com/llvm/llvm-project/pull/129755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Orlando Cazalet-Hyams
Date: 2025-04-08T08:44:10+01:00
New Revision: 308654608cb8bc5bbd5d4b3779cb7d92920dd6b7
URL:
https://github.com/llvm/llvm-project/commit/308654608cb8bc5bbd5d4b3779cb7d92920dd6b7
DIFF:
https://github.com/llvm/llvm-project/commit/308654608cb8bc5bbd5d4b3779cb7d92920dd6
79 matches
Mail list logo