SLTozer wrote:
> looks good - a few bits should be committed separately from this change, so
> please do those first and then commit this change
Separate review opened up at: https://github.com/llvm/llvm-project/pull/68967
For simplicity's sake I'll keep this patch as-is, and rebase it when th
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/66632
>From 18f494a4006b4c21b364a91107d4a07ceaf88213 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Mon, 18 Sep 2023 09:59:11 +0100
Subject: [PATCH 1/3] [LLVM] Add new attribute `optdebug` to optimize for
debuggin
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/66632
>From eccff5693ebcaac45a7ddf56cbb33a48de281041 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Mon, 18 Sep 2023 09:59:11 +0100
Subject: [PATCH 1/3] [LLVM] Add new attribute `optdebug` to optimize for
debuggin
https://github.com/SLTozer closed
https://github.com/llvm/llvm-project/pull/66632
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer approved this pull request.
It's been a bit without any comments, probably safe now to land this.
https://github.com/llvm/llvm-project/pull/84756
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
Author: Stephen Tozer
Date: 2024-03-19T15:49:10Z
New Revision: 9a96fb4445f4e9d9a7899189758ee6afbeb6510b
URL:
https://github.com/llvm/llvm-project/commit/9a96fb4445f4e9d9a7899189758ee6afbeb6510b
DIFF:
https://github.com/llvm/llvm-project/commit/9a96fb4445f4e9d9a7899189758ee6afbeb6510b.diff
LOG:
https://github.com/SLTozer closed
https://github.com/llvm/llvm-project/pull/85216
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/85981
Related to the work noted in
[discourse](https://discourse.llvm.org/t/psa-instruction-constructors-changing-to-iterator-only-insertion/77845)
and in [this](https://github.com/llvm/llvm-project/pull/85980) patch.
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/80480
>From 4d280199a9eb027127bdc9c31a266fa3e2fa6cea Mon Sep 17 00:00:00 2001
From: Paul Kirth
Date: Tue, 22 Aug 2023 15:24:03 +
Subject: [PATCH 1/2] [CMAKE] Enable FatLTO as a build option for LLVM
---
clang/cma
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/85981
>From b2f6d93d87082dd0ccc91a9a8094a4c3552b81a2 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Wed, 20 Mar 2024 17:43:10 +
Subject: [PATCH] Assorted fixes since rebase and outside core llvm
---
clang/lib
@@ -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/SLTozer updated
https://github.com/llvm/llvm-project/pull/85981
>From b2f6d93d87082dd0ccc91a9a8094a4c3552b81a2 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Wed, 20 Mar 2024 17:43:10 +
Subject: [PATCH 1/2] Assorted fixes since rebase and outside core llvm
---
clang
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/85981
>From b2f6d93d87082dd0ccc91a9a8094a4c3552b81a2 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Wed, 20 Mar 2024 17:43:10 +
Subject: [PATCH 1/3] Assorted fixes since rebase and outside core llvm
---
clang
https://github.com/SLTozer 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/SLTozer commented:
Maybe wants someone with more frontend knowledge to chime in, but all SGTM.
https://github.com/llvm/llvm-project/pull/84756
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
@@ -4746,20 +4746,32 @@ void CodeGenFunction::EmitOMPTaskBasedDirective(
if (CGF.CGM.getCodeGenOpts().hasReducedDebugInfo())
(void)DI->EmitDeclareOfAutoVariable(SharedVar, ContextValue,
CGF.Builder, false);
-
https://github.com/SLTozer approved this pull request.
https://github.com/llvm/llvm-project/pull/79345
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4266,19 +4285,140 @@ bool
InstCombinerImpl::tryToSinkInstruction(Instruction *I,
// Perform salvaging without the clones, then sink the clones.
if (!DIIClones.empty()) {
-// RemoveDIs: pass in empty vector of DPValues until we get to
instrumenting
-// this pa
https://github.com/SLTozer approved this pull request.
LGTM with latest changes.
https://github.com/llvm/llvm-project/pull/77930
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SLTozer wrote:
Yes, to my knowledge Swift emits dbg.values out of its front end, so there's
probably no reason (on the LLVM side) that clang couldn't do so as well. There
might be good reasons internal to clang that it doesn't use debug values atm,
and it's not inconceivable that we'd hit some
Author: Stephen Tozer
Date: 2024-06-11T12:19:06+01:00
New Revision: 2dc2290860355dd2bac3b655eea895fe30fde257
URL:
https://github.com/llvm/llvm-project/commit/2dc2290860355dd2bac3b655eea895fe30fde257
DIFF:
https://github.com/llvm/llvm-project/commit/2dc2290860355dd2bac3b655eea895fe30fde257.diff
https://github.com/SLTozer closed
https://github.com/llvm/llvm-project/pull/94226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer reopened
https://github.com/llvm/llvm-project/pull/94226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5746,6 +5746,57 @@ void
CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var,
Var->addDebugInfo(GVE);
}
+void CGDebugInfo::EmitPseudoVariable(CGBuilderTy &Builder,
+ llvm::Instruction *Value, QualType Ty) {
+ // Only when -g2
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/95298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SLTozer wrote:
Abandoned in favour of https://github.com/llvm/llvm-project/pull/94226.
https://github.com/llvm/llvm-project/pull/94226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Stephen Tozer
Date: 2024-06-14T09:54:56+01:00
New Revision: dc726c340392d4a0f3af9dde5f34c58d98198667
URL:
https://github.com/llvm/llvm-project/commit/dc726c340392d4a0f3af9dde5f34c58d98198667
DIFF:
https://github.com/llvm/llvm-project/commit/dc726c340392d4a0f3af9dde5f34c58d98198667.diff
https://github.com/SLTozer closed
https://github.com/llvm/llvm-project/pull/91724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SLTozer wrote:
Small recommendation that the
[patch](https://github.com/llvm/llvm-project/pull/91724) @pogo59 mentioned
above has now landed, so before merging this you should rebase and update the
test accordingly.
https://github.com/llvm/llvm-project/pull/95298
_
SLTozer wrote:
> There's one part I did not fully understand. How did you identify the
> "pre-script fixups"? What's the importance of those changes? I did not seen
> any mention of that in your PR description.
Good question, I'll add my answer to the main description: The pre-script
fixups w
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/91724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/91724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SLTozer wrote:
> Thanks for clarifying the pre-script fixes. With that resolved, this looks
> good to me.
TYVM for the LGTM! I'll leave the review up for a bit in case anyone has
anything further to add.
https://github.com/llvm/llvm-project/pull/91724
_
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/92146
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer approved this pull request.
I'm not familiar with the surrounding code, but this fixes the issue and looks
reasonable.
https://github.com/llvm/llvm-project/pull/92146
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
h
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -emit-pch -DHEADER -x c++-header %s -o %t.pch
+// RUN: %clang_cc1 -emit-llvm -include-pch %t.pch %s -o /dev/null
+
+#ifdef HEADER
+__attribute__((optnone)) void foo() {}
+#endif
SLTozer wrote:
It's not particularly important, b
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -emit-pch -DHEADER -x c++-header %s -o %t.pch
+// RUN: %clang_cc1 -emit-llvm -include-pch %t.pch %s -o /dev/null
+
+#ifdef HEADER
+__attribute__((optnone)) void foo() {}
+#endif
SLTozer wrote:
Ah, that makes sense since you're
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -debug-info-kind=limited -gomit-unreferenced-members %s
-emit-llvm -o - | FileCheck %s
SLTozer wrote:
Test needs renaming for the different flag name?
https://github.com/llvm/llvm-project/pull/87018
_
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/87018
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2755,7 +2755,7 @@ CGDebugInfo::CreateTypeDefinition(const RecordType *Ty) {
// Collect data fields (including static variables and any initializers).
CollectRecordFields(RD, DefUnit, EltTys, FwdDecl);
- if (CXXDecl)
+ if (CXXDecl && !CGM.getCodeGenOpts().DebugOmitUnr
https://github.com/SLTozer commented:
I think the comment about `s/members/methods/` is still outstanding - I agree
that methods is more descriptive than members.
I'm +1 on having this be non-default; adding it to SCE tuning is also not
necessary (or desired) for now, because this is more aggr
@@ -4260,6 +4260,13 @@ defm strict_dwarf : BoolOption<"g", "strict-dwarf",
"the specified version, avoiding features from later versions.">,
NegFlag, BothFlags<[], [ClangOption, CLOption, DXCOption]>>,
Group;
+defm omit_unreferenced_members : BoolOption<"g", "omit
@@ -4260,6 +4260,13 @@ defm strict_dwarf : BoolOption<"g", "strict-dwarf",
"the specified version, avoiding features from later versions.">,
NegFlag, BothFlags<[], [ClangOption, CLOption, DXCOption]>>,
Group;
+defm omit_unreferenced_members : BoolOption<"g", "omit
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/87018
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer approved this pull request.
> Yeah, seems I'm outvoted here. I'm a bit of a pedant for the C++ standard
> language, which doesn't talk about "methods", only "member functions".
All I'd say is that if we went with members, it ought to be
`-gomit-unreferenced-member-fu
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/90882
This patch fixes debug records in clang, by adding support for debug records to
the only remaining place that refers to DbgVariableIntrinsics directly and does
not handle DbgVariableRecords.
>From d4e716205806b
https://github.com/SLTozer closed
https://github.com/llvm/llvm-project/pull/90882
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SLTozer wrote:
It looks like this is causing crashes when including precompiled headers that
contain optnone functions; this can be reproduced with a very short header file
and any source file, even a completely empty one. Reproducer follows:
```
$ cat header.h
__attribute__((optnone)) void foo
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/94226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/94956
CGDebugInfo::EmitPseudoVariable currently uses detailed logic to exactly
collect llvm.dbg.declare users of an alloca. This patch replaces this with an
LLVM function for finding debug declares intrinsics and also
@@ -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/SLTozer updated
https://github.com/llvm/llvm-project/pull/94956
>From 56109f5f411523967ffef5a32a507d6472eebdaf Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Mon, 10 Jun 2024 11:35:02 +0100
Subject: [PATCH 1/2] [Clang] Extend EmitPseudoVariable to support debug
records
https://github.com/SLTozer closed
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
Author: Stephen Tozer
Date: 2024-06-10T13:04:40+01:00
New Revision: c5aeca732d1ff6769b0659efebd1cfb5f60487e4
URL:
https://github.com/llvm/llvm-project/commit/c5aeca732d1ff6769b0659efebd1cfb5f60487e4
DIFF:
https://github.com/llvm/llvm-project/commit/c5aeca732d1ff6769b0659efebd1cfb5f60487e4.diff
SLTozer wrote:
Alright, builds now working for LLVM, Clang, Flang, Polly, and MLIR; looks good
to merge?
https://github.com/llvm/llvm-project/pull/94226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
SLTozer wrote:
> I think some of the overloads for constructing an instruction aren't quite
> right:
That's reasonable - I defaulted to adding nullptr-defaults in the case where it
didn't cause incorrect overloads, but it's easier to keep only the existing
defaults and let any others be added
https://github.com/SLTozer closed
https://github.com/llvm/llvm-project/pull/94226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/96497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -637,8 +637,7 @@ void ARMParallelDSP::InsertParallelMACs(Reduction &R) {
Intrinsic::getDeclaration(M, Intrinsic::arm_smlad) :
Intrinsic::getDeclaration(M, Intrinsic::arm_smlald);
-IRBuilder Builder(InsertAfter->getParent(),
-
@@ -44,15 +44,19 @@ template <> struct ilist_alloc_traits {
iterator_range::iterator>
getDbgRecordRange(DbgMarker *);
+/// Class used to generate an insert position (ultimately always a
+/// BasicBlock::iterator, which it will implicitly convert to) from either:
+/// - An Inst
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/96497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer closed
https://github.com/llvm/llvm-project/pull/96497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SLTozer wrote:
Looks like I missed a spot - reverting for now, will wait for a bit to see if
any other errors fall out from the various configurations on CI before
reapplying.
https://github.com/llvm/llvm-project/pull/96497
___
cfe-commits mailing li
SLTozer wrote:
> Looks like using InsertPosition in IRBuilder has some overhead:
Hm, we're adding an extra pointer chase when we give up passing a basicblock -
I think then it makes sense to keep the option to pass BB+It, and do so when
the caller already knows the BB (while removing the need
SLTozer wrote:
> My guess here would have been that the issue is the cases where an
> Instruction* or BasicBlock* is passed rather than BB+Iterator, because those
> two cases go through an out-of-line constructor.
Seems like you're right - removing the extra dereference does
little-to-nothing
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/66632
This patch adds a new fn attribute, `optdebug`, that specifies that
optimizations should make decisions that prioritize debug info quality,
potentially at the cost of runtime performance.
This patch does not ad
@@ -2325,6 +2325,7 @@ void
CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
B.addAttribute(llvm::Attribute::Naked);
// OptimizeNone wins over OptimizeForSize and MinSize.
+F->removeFnAttr(llvm::Attribute::OptimizeForDebugging);
--
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/65699
>From f4271e03667b64c8d10d7e4de16e78b37e845229 Mon Sep 17 00:00:00 2001
From: Alex Voicu
Date: Fri, 8 Sep 2023 00:21:59 +0100
Subject: [PATCH 1/2] AS_cast the argument to `eh_typeid_for` iff typeinfo is
not in t
SLTozer wrote:
Making this attribute mutually exclusive with `optdebug` and `optsize` is fine
with me - as a question for the esteemed reviewers of this patch, would it be
preferred to add this exclusivity and associated verifier checks in a separate
patch, or as part of this patch?
https://g
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/66632
>From 18f494a4006b4c21b364a91107d4a07ceaf88213 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Mon, 18 Sep 2023 09:59:11 +0100
Subject: [PATCH 1/2] [LLVM] Add new attribute `optdebug` to optimize for
debuggin
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/66632
>From 18f494a4006b4c21b364a91107d4a07ceaf88213 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Mon, 18 Sep 2023 09:59:11 +0100
Subject: [PATCH 1/3] [LLVM] Add new attribute `optdebug` to optimize for
debuggin
SLTozer wrote:
Small ping - all comments have now been addressed now I think.
https://github.com/llvm/llvm-project/pull/66632
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/106724
This patch adds flags to clang to emit fake use intrinsics into IR, preserving
the value of variables through codegen to improve the debugging experience. The
two flags added are `-fextend-lifetimes`, which ext
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/106724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1412,6 +1420,39 @@ void
CodeGenFunction::EmitAndRegisterVariableArrayDimensions(
}
}
+/// Return the maximum size of an aggregate for which we generate a fake use
+/// intrinsic when -fextend-lifetimes is in effect.
+static uint64_t maxFakeUseAggregateSize(const ASTCont
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/106724
>From 2b529d443d5e8512ffea6566a3d4d1e04e9542e3 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Fri, 30 Aug 2024 12:49:26 +0100
Subject: [PATCH 1/2] [ExtendLifetimes] Add extend lifetimes to emit fake uses
fr
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/106724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/107369
This is part of a series of patches that tries to improve DILocation bug
detection in Debugify; see below for more details. This patch adds an
origin-tracking feature, which collects a stack trace at the point
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/107369
>From e45d7e68a371a09ea766c4accf8edc6c030fd7fd Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Wed, 4 Sep 2024 12:09:50 +0100
Subject: [PATCH 1/3] Add CMake option to enable expensive line number origin
trac
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/107279
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/107279
This is part of a series of patches that tries to improve DILocation bug
detection in Debugify; see below for more details. This is the patch that adds
the main feature, adding a set of `DebugLoc::get` function
82 matches
Mail list logo