[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
@@ -35,26 +33,29 @@ struct CDerived : NSP_1::CLeft, NSP_2::CRight { int fooDerived() { return 3; }; }; +void use(void *, ...); + int main() { NSP::CBase Base; NSP_1::CLeft Left; NSP_2::CRight Right; CDerived Derived; + use(&Base, &Left, &Right, &Derived);

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
@@ -1,5 +1,3 @@ -// REQUIRES: target={{x86_64.*-linux.*}} jmorse wrote: Do the RUN lines need updating to not hard-code the x86_64 triple too? Otherwise buildbots that don't build for x86 might trip up on this? Broadening out this test coverage to not be fixed

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,87 @@ +// For CTemplate we check in case of: +// - Implicitly instantiate whole class by up-casting: +// * The vtable is generated with comdat +// * Its '_vtable$' is generated +// - Implicitly instantiate member function only: +// * The vtable is NOT generated +/

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: I think adding / adjusting this coverage is good -- a few questions / requests inline. https://github.com/llvm/llvm-project/pull/151818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,93 @@ +// The debug info of vtable is attached conditionally to whether +// - Member functions are inlined or not +// - Definition of destructor is visible or not jmorse wrote: Would you be able to give a sentence summarising what the CHECK-lines below

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/151818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr] Enable -gkey-instructions by default if optimisations are enabled (PR #149509)

2025-08-26 Thread Jeremy Morse via cfe-commits
@@ -4394,10 +4394,15 @@ static void renderDwarfFormat(const Driver &D, const llvm::Triple &T, static void renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T, - const ArgList &Args, bool IRInput, ArgStringList &CmdArgs, -

[clang] [KeyInstr] Enable -gkey-instructions by default if optimisations are enabled (PR #149509)

2025-08-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/149509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr] Enable -gkey-instructions by default if optimisations are enabled (PR #149509)

2025-08-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/149509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Move simplifyConstraint to TargetInfo.cpp (PR #154905)

2025-08-23 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: This seems fine; note that while your change to use StringRef as a parameter type is cleaner, both call sites you change are passing `char *`'s and I believe this means we'll run `strlen` every time this function is called? Better to construct directly from

[clang] [llvm] [clang][DebugInfo] Emit unified (Itanium) mangled name to structor declarations (PR #154142)

2025-08-21 Thread Jeremy Morse via cfe-commits
jmorse wrote: Similar thanks for the heads up, The change broadly LGTMs, although this isn't a zone of debug-info that I'm really familiar with. https://github.com/llvm/llvm-project/pull/154142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][DebugInfo] Disable VTable debug info (#130255) on COFF platforms (PR #151684)

2025-08-04 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. SGTM, please do! https://github.com/llvm/llvm-project/pull/151684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-07-23 Thread Jeremy Morse via cfe-commits
jmorse wrote: Sorry about that -- I'm generally unfamiliar with MinGW/Cygwin, reading #149639 it sounds like this is down to how relocations for debug-info are managed with DWARF-on-Windows. A simple enough solution is to not emit this vtable-location-variable for that target, which might be p

[clang] [KeyInstr] Inline asm atoms (PR #149076)

2025-07-22 Thread Jeremy Morse via cfe-commits
jmorse wrote: Seems like a fair choice to me, and we can refine it in the future; ship it! https://github.com/llvm/llvm-project/pull/149076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [KeyInstr] Inline asm atoms (PR #149076)

2025-07-22 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM -- is there a possibility that there'll be multiple stores coming from (output arguments of?) inline asm blocks? One wonders what the desired stepping behaviour is then: arguably you want to step through all the side-effects, or some m

[clang] [llvm] [DebugInfo] Remove intrinsic-flavours of findDbgUsers (PR #149816)

2025-07-21 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse closed https://github.com/llvm/llvm-project/pull/149816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DebugInfo] Remove intrinsic-flavours of findDbgUsers (PR #149816)

2025-07-21 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/149816 >From 43916ffb25936a4a9d38ea39e354e9ddfda333a1 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Fri, 18 Jul 2025 12:07:13 +0100 Subject: [PATCH 1/4] [DebugInfo] Remove intrinsic-flavours of findDbgUsers This is

[clang] [KeyInstr] goto stmt atoms (PR #149101)

2025-07-21 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/149101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Fix verifier check (PR #149043)

2025-07-16 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: Given that we've found a verifier error that necessitates this patch, it presumably wants a test. https://github.com/llvm/llvm-project/pull/149043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [libc] [llvm] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction (PR #144383)

2025-07-15 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse closed https://github.com/llvm/llvm-project/pull/144383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction (PR #144383)

2025-07-15 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/144383 >From 63654fb7cf702a1d0c5fb5f8d526e926ec5a3470 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Fri, 13 Jun 2025 15:39:53 +0100 Subject: [PATCH 1/2] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstructio

[clang] [libc] [llvm] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction (PR #144383)

2025-07-15 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/144383 >From 63654fb7cf702a1d0c5fb5f8d526e926ec5a3470 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Fri, 13 Jun 2025 15:39:53 +0100 Subject: [PATCH] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction T

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-15 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,160 @@ +# Key Instructions debug info in LLVM and Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping by discriminating the significance of instrucions that make up source language statements. This document explains

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-15 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,160 @@ +# Key Instructions debug info in LLVM and Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping by discriminating the significance of instrucions that make up source language statements. This document explains

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-15 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,160 @@ +# Key Instructions debug info in LLVM and Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping by discriminating the significance of instrucions that make up source language statements. This document explains

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-15 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: Soft LGTM, awaiting views from @jryans too https://github.com/llvm/llvm-project/pull/137991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-15 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/137991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-15 Thread Jeremy Morse via cfe-commits
jmorse wrote: Well, github has thrown away my review comments again, so I've no idea 🤷 . Phabricator was better. https://github.com/llvm/llvm-project/pull/137991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [DebugInfo] Add option for producing no source-file hash (PR #148657)

2025-07-14 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse closed https://github.com/llvm/llvm-project/pull/148657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DebugInfo] Add option for producing no source-file hash (PR #148657)

2025-07-14 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse created https://github.com/llvm/llvm-project/pull/148657 Clang can chose which sort of source-file hash is attached to a DIFile metadata node. However, whenever hashing is possible, we /always/ attach a hash. This patch permits users who want DWARF5 but don't want the

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. + +## Implementation + +See the [LLVM docs](../../llvm/docs/KeyInstr

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -63,6 +63,7 @@ intermediate LLVM representation. ResponseGuide Remarks RemoveDIsDebugInfo + KeyInstructions jmorse wrote: Is there a corresponding table-of-contents for clang too? https://github.com/llvm/llvm-project/pull/137991

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. + +## Implementation + +See the [LLVM docs](../../llvm/docs/KeyInstr

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. + +## Implementation + +See the [LLVM docs](../../llvm/docs/KeyInstr

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. + +## Implementation + +See the [LLVM docs](../../llvm/docs/KeyInstr

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: Various recommendations, but looking good. https://github.com/llvm/llvm-project/pull/137991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. jmorse wrote: This provides a negative reason (red

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/137991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr] Disable key-instructions for coroutine scopes (PR #147551)

2025-07-14 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse closed https://github.com/llvm/llvm-project/pull/147551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstrs] Disable key-instructions for coroutine scopes (PR #147551)

2025-07-08 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse created https://github.com/llvm/llvm-project/pull/147551 At this time (immediately prior to llvm21 branching) we haven't instrumented coroutine generation to identify the "key" instructions of things like co_return and similar. This will lead to worse stepping behavio

[clang] [PS5][Driver] Fix bad negative check in ps5-linker.c test case (PR #147484)

2025-07-08 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/147484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-30 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/144346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-30 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions %s -gno-column-info -debug-info-kind=line-tables-only -emit-llvm -o - \ +// RUN: | FileCheck %s + +// g::h and i can be memcpy'd, check the assignment gets Key Instructions metadata. + +struct e { +

[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-30 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/144346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang][NFC] Don't set -dwarf-use-key-instructions (PR #144115)

2025-06-30 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM (my least favourite part of github, aside from it not being Phabricator, is that it chucks away all the inline comments randomly. Yay). Keeping on the HELP checklines though: if you symlink clang to `/bin/true` then with no checklines

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-27 Thread Jeremy Morse via cfe-commits
@@ -1904,7 +1904,8 @@ CGDebugInfo::createInlinedSubprogram(StringRef FuncName, /*ScopeLine=*/0, /*Flags=*/llvm::DINode::FlagArtificial, /*SPFlags=*/llvm::DISubprogram::SPFlagDefinition, -/*TParams=*/nullptr, /*ThrownTypes=*/nullptr, /*Annotations

[clang] [PS5][Driver] Allow selection of CRT with `-L` (PR #145869)

2025-06-27 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM with a question https://github.com/llvm/llvm-project/pull/145869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Allow selection of CRT with `-L` (PR #145869)

2025-06-27 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/145869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Allow selection of CRT with `-L` (PR #145869)

2025-06-27 Thread Jeremy Morse via cfe-commits
@@ -200,12 +200,10 @@ // CHECK-NO-TARGETLIB-SAME: "-L." // RUN: mkdir -p %t.dir/myroot/target/lib -// RUN: touch %t.dir/myroot/target/lib/crti.o // RUN: env SCE_PROSPERO_SDK_DIR=%t.dir/myroot %clang --target=x64_64-sie-ps5 %s -### -Luser 2>&1 | FileCheck --check-prefixes=CHE

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. No strong opinion on the arguments really, thing can always be re-rationalised in the future. > Not sure I follow this question - can you elaborate? It's a draft fragment of one of the questions I asked that floated to the bottom, whoops.

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -1904,7 +1904,8 @@ CGDebugInfo::createInlinedSubprogram(StringRef FuncName, /*ScopeLine=*/0, /*Flags=*/llvm::DINode::FlagArtificial, /*SPFlags=*/llvm::DISubprogram::SPFlagDefinition, -/*TParams=*/nullptr, /*ThrownTypes=*/nullptr, /*Annotations

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -922,8 +922,8 @@ template <> struct MDNodeKeyImpl { MDString *LinkageName; Metadata *File; unsigned Line; - Metadata *Type; unsigned ScopeLine; + Metadata *Type; jmorse wrote: SGTM https://github.com/llvm/llvm-project/pull/144107 ___

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/144107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang][NFC] Don't set -dwarf-use-key-instructions (PR #144115)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -8,8 +8,14 @@ // HELP-NOT: key-instructions // KEY-INSTRUCTIONS: "-gkey-instructions" -// KEY-INSTRUCTIONS: "-mllvm" "-dwarf-use-key-instructions" // NO-KEY-INSTRUCTIONS-NOT: key-instructions - TODO: Add smoke test once some functionality has been added. +// RUN %c

[clang] [KeyInstr][Clang][NFC] Don't set -dwarf-use-key-instructions (PR #144115)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -8,8 +8,14 @@ // HELP-NOT: key-instructions jmorse wrote: Not an issue with this patch but, with no positive HELP: prefixes, this check passes vacuously. https://github.com/llvm/llvm-project/pull/144115 ___ cfe-

[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions %s -gno-column-info -debug-info-kind=line-tables-only -emit-llvm -o - \ +// RUN: | FileCheck %s + +// g::h and i can be memcpy'd, check the assignment gets Key Instructions metadata. + +struct e { +

[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: >From the context, it feels like clang is going to try turning groups of >initializers into memcpys, is that right? If so, does that affect the desired >stepping behaviour, i.e. would multiple assignments be grouped into one >memcpy? I suppose it's not majo

[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/144346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] Atomic ops atoms (PR #141624)

2025-06-24 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,162 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -x c++ -std=c++17 %s -debug-info-kind=line-tables-only -emit-llvm -o - -gno-column-info \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank +// RUN: %clang_cc1 -

[clang] [KeyInstr][Clang] Atomic ops atoms (PR #141624)

2025-06-24 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,162 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -x c++ -std=c++17 %s -debug-info-kind=line-tables-only -emit-llvm -o - -gno-column-info \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank +// RUN: %clang_cc1 -

[clang] [KeyInstr][Clang] Atomic ops atoms (PR #141624)

2025-06-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM, with a test question https://github.com/llvm/llvm-project/pull/141624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] Atomic ops atoms (PR #141624)

2025-06-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/141624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-23 Thread Jeremy Morse via cfe-commits
@@ -1904,7 +1904,8 @@ CGDebugInfo::createInlinedSubprogram(StringRef FuncName, /*ScopeLine=*/0, /*Flags=*/llvm::DINode::FlagArtificial, /*SPFlags=*/llvm::DISubprogram::SPFlagDefinition, -/*TParams=*/nullptr, /*ThrownTypes=*/nullptr, /*Annotations

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-23 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM, I think this raises a few questions about whether we're going to support non-key-instructions code forever more. AFAIUI the premise is that the debugging behaviour is worse if you've got groupless instructions in a key-instructions pr

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-23 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/144107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-23 Thread Jeremy Morse via cfe-commits
@@ -922,8 +922,8 @@ template <> struct MDNodeKeyImpl { MDString *LinkageName; Metadata *File; unsigned Line; - Metadata *Type; unsigned ScopeLine; + Metadata *Type; jmorse wrote: This is space packing rather than being related to a functional change

[clang] [libc] [llvm] [DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction (PR #144383)

2025-06-16 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse created https://github.com/llvm/llvm-project/pull/144383 There are no longer debug-info instructions, thus we don't need this skipping. Horray! CC @WenleiHe , `getNextNonDebugInfoInstruction` has a "skip pseudo-probes" argument that appears to be unused throughout al

[clang] [flang] [llvm] [mlir] [DebugInfo][RemoveDIs] Rip out the UseNewDbgInfoFormat flag (PR #143207)

2025-06-09 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse closed https://github.com/llvm/llvm-project/pull/143207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] [DebugInfo][RemoveDIs] Rip out the UseNewDbgInfoFormat flag (PR #143207)

2025-06-09 Thread Jeremy Morse via cfe-commits
jmorse wrote: Removing the `--experimental-debuginfo-iterators` flag from 1 flang and 1 mlir test too -- the flag has been a dummy for a month and doesn't do anything, the extra RUNlines were just extra coverage for when intrinsic support was still feasible. https://github.com/llvm/llvm-proje

[clang] [flang] [llvm] [mlir] [DebugInfo][RemoveDIs] Rip out the UseNewDbgInfoFormat flag (PR #143207)

2025-06-09 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/143207 >From b0cf784e2bf0b7c42f5365907dc94353676ae8fc Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Thu, 15 May 2025 14:10:58 +0100 Subject: [PATCH 1/7] [DebugInfo][RemoveDIs] Rip out the UseNewDbgInfoFormat flag

[clang] [llvm] [mlir] [DebugInfo][RemoveDIs] Rip out the UseNewDbgInfoFormat flag (PR #143207)

2025-06-09 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/143207 >From b0cf784e2bf0b7c42f5365907dc94353676ae8fc Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Thu, 15 May 2025 14:10:58 +0100 Subject: [PATCH 1/6] [DebugInfo][RemoveDIs] Rip out the UseNewDbgInfoFormat flag

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #142166)

2025-06-09 Thread Jeremy Morse via cfe-commits
jmorse wrote: (Transparency, I wrote some of the code in the PR so dunno if I should review it,) > I /think/ function-local types need to go in definitions - in /abstract/ > definitions if they exist (not in the inlined instances or concrete out of > line instances). I think this highlights

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-06-06 Thread Jeremy Morse via cfe-commits
jmorse wrote: Interesting -- I suppose the new variable recording where vtables are count as a source-variable, and in some circumstances the vtable address must be optimised away? (Whole program devirtualisation for example). I'd suggest that this isn't a concerning reduction in coverage (bec

[clang] [KeyInstr][Clang] Ret atom (PR #134652)

2025-06-04 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][KeyInstr][Clang] Add some additional tests (PR #134654)

2025-06-03 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM with a nit https://github.com/llvm/llvm-project/pull/134654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][KeyInstr][Clang] Add some additional tests (PR #134654)

2025-06-03 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank + +// RUN: %clang_cc1 -triple x86

[clang] [KeyInstr][Clang] Ret atom (PR #134652)

2025-06-03 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,101 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \ +// RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-CXX + +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructi

[clang] [KeyInstr][Clang] Ret atom (PR #134652)

2025-06-03 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank + +// RUN: %clang_cc1 -triple x86_

[clang] [KeyInstr][Clang] Ret atom (PR #134652)

2025-06-03 Thread Jeremy Morse via cfe-commits
@@ -1118,6 +1118,8 @@ void CodeGenFunction::EmitBranchThroughCleanup(JumpDest Dest) { // Create the branch. llvm::BranchInst *BI = Builder.CreateBr(Dest.getBlock()); + // This is the primary instruction for this atom, acting in place of a ret. jmorse wro

[clang] [KeyInstr][Clang] Ret atom (PR #134652)

2025-06-03 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/134652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] Ret atom (PR #134652)

2025-06-03 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: If I understand correctly, most of the test changes are to ensure that return instructions get /an/ atom group, without being specific about which? IMO it'd be better to make that number explicit to avoid a return accidentally being part of the _wrong_ atom

[clang] [NFC][KeyInstr][Clang] Add some additional tests (PR #134654)

2025-06-03 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/134654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] For stmt atom (PR #134646)

2025-06-03 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. Continues to LGTM https://github.com/llvm/llvm-project/pull/134646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] For stmt atom (PR #134646)

2025-06-03 Thread Jeremy Morse via cfe-commits
@@ -1418,6 +1427,12 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S, if (CGM.shouldEmitConvergenceTokens()) ConvergenceTokenStack.pop_back(); + + if (FinalBodyBB) { +// Key Instructions: We want the for closing brace to be step-able on to +// match existin

[clang] [KeyInstr][Clang] For stmt atom (PR #134646)

2025-06-03 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/134646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] For stmt atom (PR #134646)

2025-06-03 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM, with a nit/question inline https://github.com/llvm/llvm-project/pull/134646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][DebugInfo][clang] Finalize all declaration subprograms in DIBuilder::finalize() (PR #139914)

2025-06-02 Thread Jeremy Morse via cfe-commits
jmorse wrote: > Performance cost in terms of compilation time? Compilation time indeed -- there's a small chance that we unexpectedly start producing masses of useless type information, which would mean we'd have to rethink this. It'll show up on https://llvm-compile-time-tracker.com/ pretty

[clang] [llvm] [llvm][DebugInfo][clang] Finalize all declaration subprograms in DIBuilder::finalize() (PR #139914)

2025-06-02 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. > It seems to me that manual finalizeSubprogram() calls were added > sporadically, not by following declaration-vs-definition logic. > With the call added [and with #119001], the test output changes: declaration > DISubprograms have their D

[clang] [KeyInstr][Clang] Catch variable init atom (PR #134641)

2025-05-23 Thread Jeremy Morse via cfe-commits
@@ -5055,6 +5055,7 @@ void ItaniumCXXABI::emitBeginCatch(CodeGenFunction &CGF, // Emit the local. CodeGenFunction::AutoVarEmission var = CGF.EmitAutoVarAlloca(*CatchParam); + ApplyAtomGroup Grp(CGF.getDebugInfo()); InitCatchParam(CGF, *CatchParam, var.getObjectAddress(

[clang] [KeyInstr][Clang] Switch stmt atom (PR #134643)

2025-05-23 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] Switch stmt atom (PR #134643)

2025-05-23 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -gkey-instructions -x c++ -std=c++17 %s -debug-info-kind=line-tables-only -emit-llvm -o - \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank --check-prefixes=CHECK,CHECK-CXX + +// RUN: %clang_cc1 -gkey-inst

[clang] [KeyInstr][Clang] Switch stmt atom (PR #134643)

2025-05-23 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/134643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] Catch variable init atom (PR #134641)

2025-05-23 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. (LGTM with the braces) https://github.com/llvm/llvm-project/pull/134641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >