[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-27 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. This part looks good to me, thanks for working on this! 😄 https://github.com/llvm/llvm-project/pull/107279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-27 Thread J. Ryan Stinnett via cfe-commits
@@ -22,6 +23,67 @@ namespace llvm { class LLVMContext; class raw_ostream; class DILocation; + class Function; + +#if ENABLE_DEBUGLOC_COVERAGE_TRACKING + // Used to represent different "kinds" of DebugLoc, expressing that a DebugLoc + // is either ordinary, containing

[clang] [llvm] [DLCov 4/5] Track coverage and origins through IRBuilder (PR #108214)

2024-09-26 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. This part looks good overall, thanks for working on this! 😄 One small note inline below. https://github.com/llvm/llvm-project/pull/108214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [llvm] [DLCov 4/5] Track coverage and origins through IRBuilder (PR #108214)

2024-09-26 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/108214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DLCov 4/5] Track coverage and origins through IRBuilder (PR #108214)

2024-09-26 Thread J. Ryan Stinnett via cfe-commits
@@ -90,12 +90,23 @@ class IRBuilderCallbackInserter : public IRBuilderDefaultInserter { /// Common base class shared among various IRBuilders. class IRBuilderBase { /// Pairs of (metadata kind, MDNode *) that should be added to all newly - /// created instructions, like !db

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-25 Thread J. Ryan Stinnett via cfe-commits
@@ -1279,6 +1279,9 @@ void Instruction::swapProfMetadata() { void Instruction::copyMetadata(const Instruction &SrcInst, ArrayRef WL) { + if (WL.empty() || is_contained(WL, LLVMContext::MD_dbg)) +setDebugLoc(SrcInst.getDebugLoc()); --

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-25 Thread J. Ryan Stinnett via cfe-commits
@@ -48,22 +64,29 @@ namespace llvm { Temporary }; - // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify - // to ignore intentionally-empty DebugLocs. - class DILocAndCoverageTracking : public TrackingMDNodeRef { + // Extends TrackingMDNodeRef

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-24 Thread J. Ryan Stinnett via cfe-commits
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace, return true; } +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +void sys::symbolizeAddresses(AddressSet &Addresses, + SymbolizedAddressMap &SymbolizedAddresses)

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-24 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-24 Thread J. Ryan Stinnett via cfe-commits
@@ -487,14 +490,15 @@ def Main(): if bugs_metadata == "DILocation": try: +origin = bug["origin"] action = bug["action"] bb_name = bug["bb-name"]

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-24 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-24 Thread J. Ryan Stinnett via cfe-commits
@@ -115,6 +138,23 @@ namespace llvm { DebugLocKind getKind() const { return Loc.Kind; } #endif +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +#if !ENABLE_DEBUGLOC_COVERAGE_TRACKING +#error Cannot enable DebugLoc origin-tracking without coverage-tracking! +#endif jr

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-24 Thread J. Ryan Stinnett via cfe-commits
@@ -22,6 +23,67 @@ namespace llvm { class LLVMContext; class raw_ostream; class DILocation; + class Function; + +#if ENABLE_DEBUGLOC_COVERAGE_TRACKING + // Used to represent different "kinds" of DebugLoc, expressing that a DebugLoc + // is either ordinary, containing

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -48,22 +64,29 @@ namespace llvm { Temporary }; - // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify - // to ignore intentionally-empty DebugLocs. - class DILocAndCoverageTracking : public TrackingMDNodeRef { + // Extends TrackingMDNodeRef

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace, return true; } +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +void sys::symbolizeAddresses(AddressSet &Addresses, + SymbolizedAddressMap &SymbolizedAddresses)

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -115,6 +138,23 @@ namespace llvm { DebugLocKind getKind() const { return Loc.Kind; } #endif +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +#if !ENABLE_DEBUGLOC_COVERAGE_TRACKING +#error Cannot enable DebugLoc origin-tracking without coverage-tracking! +#endif jr

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -487,14 +490,15 @@ def Main(): if bugs_metadata == "DILocation": try: +origin = bug["origin"] action = bug["action"] bb_name = bug["bb-name"]

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -28,6 +31,11 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/JSON.h" #include +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +// We need the Signals header to operate on stacktraces if we're using DebugLoc jryans wrote: stacktrace -> stack trace http

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace, return true; } +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +void sys::symbolizeAddresses(AddressSet &Addresses, + SymbolizedAddressMap &SymbolizedAddresses)

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -50,11 +50,15 @@ class TargetRegisterInfo; class MergePotentialsElt { unsigned Hash; MachineBasicBlock *Block; - DebugLoc BranchDebugLoc; + // We use MDNode rather than DebugLoc here because under certain CMake + // options*, DebugLoc may conta

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -1279,6 +1279,9 @@ void Instruction::swapProfMetadata() { void Instruction::copyMetadata(const Instruction &SrcInst, ArrayRef WL) { + if (WL.empty() || is_contained(WL, LLVMContext::MD_dbg)) +setDebugLoc(SrcInst.getDebugLoc()); --

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -55,6 +73,28 @@ namespace sys { ///specified, the entire frame is printed. void PrintStackTrace(raw_ostream &OS, int Depth = 0); +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +#ifdef NDEBUG +#error DebugLoc origin-tracking should not be enabled in Release builds. +#endif

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans requested changes to this pull request. More exciting work! 😄 Seems roughly sensible, but appears to duplicate some code that can hopefully be shared. https://github.com/llvm/llvm-project/pull/107369 ___ cfe-commits mailing l

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -22,6 +23,67 @@ namespace llvm { class LLVMContext; class raw_ostream; class DILocation; + class Function; + +#if ENABLE_DEBUGLOC_COVERAGE_TRACKING + // Used to represent different "kinds" of DebugLoc, expressing that a DebugLoc + // is either ordinary, containing

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -11,6 +11,22 @@ #include "llvm/IR/DebugInfo.h" using namespace llvm; +#if ENABLE_DEBUGLOC_COVERAGE_TRACKING +DILocAndCoverageTracking::DILocAndCoverageTracking(const DILocation *L) +: TrackingMDNodeRef(const_cast(L)), + Kind(DebugLocKind::Normal) {} + +DebugLoc Deb

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -2080,6 +2081,10 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) { } if (!DL) { +// FIXME: We could assert that `DL.getKind() != DebugLocKind::Temporary` +// here, or otherwise record any temporary DebugLocs seen to ensure that +// transient co

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans commented: Looks good overall, a few comments inline. Thanks for working on this feature, I believe this will be quite useful! 😄 https://github.com/llvm/llvm-project/pull/107279 ___ cfe-commits mailing list cfe-commits@list

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang] [llvm] [RemoveDIs] Print IR with debug records by default (PR #91724)

2024-05-13 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. Thanks for clarifying the pre-script fixes. With that resolved, this looks good to me. https://github.com/llvm/llvm-project/pull/91724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [llvm] [RemoveDIs] Print IR with debug records by default (PR #91724)

2024-05-13 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans commented: Overall, your process looks good to me! Thanks for working on this and including such a detailed description. This will surely aid downstream maintainers. 😄 There's one part I did not fully understand. How did you identify the "pre-script fixups"? What's

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-05-08 Thread J. Ryan Stinnett via cfe-commits
jryans wrote: It would be great to add a few notes to document this additional op in the [`DIExpression` list of ops](https://llvm.org/docs/LangRef.html#diexpression). It would be especially good for those added docs to clarify the difference between this and `DW_OP_LLVM_fragment`. (I do under

[clang] [RemoveDIs][Clang] Resolve DILocalVariables used by DbgRecords (PR #90882)

2024-05-02 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. 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

[clang] [lld] [llvm] Rename -macosx_version_min to -macos_version_min (PR #88810)

2024-04-24 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans commented: AIUI, this is straightforward case of updating tools to use new option names. I suppose there is a chance it triggers failures in e.g. older linkers that don't support the newer names, but I assume on Apple platforms there's less risk of that anyway. Do yo

[clang] [lld] [llvm] Rename -macosx_version_min to -macosx_version_min (PR #88810)

2024-04-15 Thread J. Ryan Stinnett via cfe-commits
jryans wrote: Perhaps good to edit the PR title, it mentions the same flag twice at the moment. https://github.com/llvm/llvm-project/pull/88810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. Thanks, seems like a fine temporary measure to me! 😄 https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. > This patch makes sure we encode the constant in a `DIExpression` on > definitions, which is tested. And we have tests for ensuring that > `DW_OP_constu` expressions get turned into `DW_AT_const_value`s (I know of at > least `llvm/test/Deb

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread J. Ryan Stinnett via cfe-commits
@@ -5503,11 +5516,17 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, } AppendAddressSpaceXDeref(AddressSpace, Expr); +llvm::DIExpression *E = nullptr; +if (Expr.empty()) { + if (auto const *InitVal = evaluateConstantInitializer(D)) +

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/72730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Attach DW_AT_const_value to static data-member definitions if available (PR #72730)

2023-11-18 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans commented: Overall this looks good, thanks! I think we may want to add a test to check that the output DWARF has a const value in the expected place, since consumers are relying on it. https://github.com/llvm/llvm-project/pull/72730 ___

[clang-tools-extra] [IPSCCP] Variable not visible at Og. (PR #66745)

2023-10-06 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[libunwind] [IPSCCP] Variable not visible at Og. (PR #66745)

2023-10-06 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang] [IPSCCP] Variable not visible at Og. (PR #66745)

2023-10-06 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang-tools-extra] [IPSCCP] Variable not visible at Og. (PR #66745)

2023-10-06 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang] [IPSCCP] Variable not visible at Og. (PR #66745)

2023-10-06 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[libunwind] [IPSCCP] Variable not visible at Og. (PR #66745)

2023-10-06 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang-tools-extra] [IPSCCP] Variable not visible at Og. (PR #66745)

2023-10-04 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. Looks good to me, thanks! 😄 Other reviewers had more comments last time around, so probably best to wait for at least one more review before landing. https://github.com/llvm/llvm-project/pull/66745 _

[clang-tools-extra] [IPSCCP] Variable not visible at Og: (PR #66745)

2023-10-03 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang] [IPSCCP] Variable not visible at Og: (PR #66745)

2023-10-03 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans 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

[clang] 241cceb - [Clang][Tooling] Accept preprocessed input files

2023-08-08 Thread J. Ryan Stinnett via cfe-commits
Author: J. Ryan Stinnett Date: 2023-08-08T12:44:48+01:00 New Revision: 241cceb9af844ef7d7a87124407a04b0a64991fe URL: https://github.com/llvm/llvm-project/commit/241cceb9af844ef7d7a87124407a04b0a64991fe DIFF: https://github.com/llvm/llvm-project/commit/241cceb9af844ef7d7a87124407a04b0a64991fe.di

[clang] ecade80 - [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2023-01-18 Thread J. Ryan Stinnett via cfe-commits
Author: Caleb Zulawski Date: 2023-01-18T18:20:59Z New Revision: ecade80d93960ad01d8665db02c23841e055a80f URL: https://github.com/llvm/llvm-project/commit/ecade80d93960ad01d8665db02c23841e055a80f DIFF: https://github.com/llvm/llvm-project/commit/ecade80d93960ad01d8665db02c23841e055a80f.diff LOG

[libunwind] r362113 - [Docs] Modernize references to macOS

2019-05-30 Thread J. Ryan Stinnett via cfe-commits
Author: jryans Date: Thu May 30 09:46:22 2019 New Revision: 362113 URL: http://llvm.org/viewvc/llvm-project?rev=362113&view=rev Log: [Docs] Modernize references to macOS Summary: This updates all places in documentation that refer to "Mac OS X", "OS X", etc. to instead use the modern name "macOS"

r362113 - [Docs] Modernize references to macOS

2019-05-30 Thread J. Ryan Stinnett via cfe-commits
Author: jryans Date: Thu May 30 09:46:22 2019 New Revision: 362113 URL: http://llvm.org/viewvc/llvm-project?rev=362113&view=rev Log: [Docs] Modernize references to macOS Summary: This updates all places in documentation that refer to "Mac OS X", "OS X", etc. to instead use the modern name "macOS"